Skip to content

feat(core): allow disabling tool output truncation#28907

Open
rekram1-node wants to merge 4 commits into
devfrom
issue-13770-tool-output-docs
Open

feat(core): allow disabling tool output truncation#28907
rekram1-node wants to merge 4 commits into
devfrom
issue-13770-tool-output-docs

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

@rekram1-node rekram1-node commented May 22, 2026

Summary

  • add a discriminated tool_output configuration: { truncate: false } disables shared truncation, while the enabled variant accepts max_lines and max_bytes
  • reject configurations that combine truncate: false with threshold values
  • bypass truncation for generic, MCP, plugin, and streaming shell tool output when disabled
  • omit shell truncation guidance when disabled and document the public configuration
  • update the built-in customization skill to consult https://opencode.ai/config.json selectively rather than advocate disabling truncation
  • regenerate the JavaScript SDK config type

Configuration

{
  "tool_output": {
    "truncate": false
  }
}

Or configure thresholds while truncation is enabled:

{
  "tool_output": {
    "max_lines": 200,
    "max_bytes": 8192
  }
}

These variants cannot be combined.

Verification

  • bun test test/config/config.test.ts test/tool/truncation.test.ts test/tool/shell.test.ts from packages/opencode
  • bun run build from packages/web
  • ./packages/sdk/js/script/build.ts
  • git diff --check

Addresses the configuration and documentation portions of #13770. Other reported behavior concerns in that issue remain separate.

@rekram1-node rekram1-node changed the title docs: document tool output truncation settings feat(core): allow disabling tool output truncation May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant