Skip to content

tool_output config option is undocumented #45232

Open

Description

@harshil-mistry

Description

tool_output has been a working config option since PR #23770 (merged 2026-04-22) and is not mentioned anywhere in the docs.

It is fully specified in both config schemas, with descriptions:

packages/core/src/v1/config/config.ts:

tool_output: Schema.optional(
  Schema.Struct({
    max_lines: Schema.optional(PositiveInt).annotate({
      description: "Maximum lines of tool output before it is truncated and saved to disk (default: 2000)",
    }),
    max_bytes: Schema.optional(PositiveInt).annotate({
      description: "Maximum bytes of tool output before it is truncated and saved to disk (default: 51200)",
    }),
  }),
)

and read at runtime in packages/opencode/src/tool/truncate.ts:

maxLines: cfg?.tool_output?.max_lines ?? MAX_LINES,
maxBytes: cfg?.tool_output?.max_bytes ?? MAX_BYTES,

Searching packages/web/src/content/docs/ for tool_output, max_lines or max_bytes returns nothing.

That matters because truncation is visible and often unwanted — a tool whose output crosses 2000 lines or 50 KB is replaced with a preview plus a file path, and #11313 is an example of users hitting it. The knob to raise it exists and is undiscoverable.

config.mdx has a dedicated section for nearly every other option (share, shell, subagent_depth, server, formatter, lsp, ...), so this looks like an oversight from when the feature landed rather than a deliberate omission.

For the record, config.mdx is also missing skills, references, enterprise, remote_config and username, plus the legacy autoshare/mode/layout keys. I kept the PR to tool_output since that is the one with a concrete user-facing consequence; happy to do the others separately if wanted.

Operating System

Windows 11 (documentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions