Skip to content

[FEATURE]: TUI setting to show tool calls expanded by default #51308

Open

Description

@Yashpal-0
  • I have verified this feature I'm about to request hasn't been suggested before.

Add a CLI setting (e.g. under session in cli.json) to render tool calls expanded by default in the TUI.

Today every completed tool call renders as a collapsed one-line summary (e.g. ✓ shell [command=...]), and input/output details only appear after clicking each row individually. There is no way to make expanded the default.

Notes from checking the source (v2.0.16 and the v2 branch):

  • Standalone tool calls (GenericTool etc.) hardcode createSignal(false) for expansion.
  • The upcoming session.verbosity: "high" only opens exploration/instruction groups by default ("everything else starts collapsed"), so it does not cover standalone tool calls like shell/MCP tools.

Benefit: users who review agent commands as they run don't have to click every row to see what actually ran.

Environment: opencode 2.0.16 (latest channel), Ubuntu Linux, xterm-256color.

Activity

  1. github-actions commented on Sep 25, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the request and for checking the source! To restate it: you'd like a TUI setting, e.g. under session in cli.json, that shows tool calls (shell, MCP and other tools) expanded by default. That way you can see what ran without clicking each row.

    You're right that the TUI doesn't offer this today: standalone tool calls always start collapsed, and session.verbosity: "high" only opens exploration and instruction groups. This also can't be done as a plugin yet, because TUI plugins can't change how tool rows are rendered or whether they start expanded. Maintainers will consider it.

    Related issues:

  3. Epslion404 commented on Nov 10, 2026

    @Epslion404

    Same class of request, but for the nested child calls of execute (Code Mode) — those aren't covered by the standalone-tool case in this issue, and they're a separate component.

    execute streams its children through metadata.toolCalls and renders one ExecuteCallView per child, so a single collapsed execute row can hide dozens of ssh.run / read calls.

    Verified against dev today (running opencode 2.2.5):

    • packages/tui/src/routes/session/index.tsx
      • Execute (L3410) → executeCalls(props.metadata.toolCalls) → ExecuteCallView per child.
      • ExecuteCallView (L3357): const [expanded, setExpanded] = createSignal(false) (L3360) — local signal, nothing reads config for it.
      • The only way to toggle is onMouseUp → setExpanded((value) => !value) (L3376–3379). No command or keybind exists for it (checked the full command list: only session.toggle.thinking, session.toggle.exploration_grouping, session.verbosity.cycle, session.background touch tool display).
      • Collapsed text is executeCallSummary(props.call()) → packages/tui/src/util/tool-display.ts:35 = tool + primitiveInputSummary(input). Expanded text drops the summary entirely and shows the bare tool name plus an indented key: value block.
    • session.verbosity: "high" does not affect these rows. It only feeds the group default:
      groupExpanded(id, kind) ?? (verbosity === "high" && (kind === "exploration" || kind === "instructions")).
      Reproduced: Medium → High leaves every execute child row collapsed, because these rows aren't part of an exploration/instruction group.

    Smallest change that fits the existing conventions:

    1. Add a key next to session.verbosity in packages/tui/src/config/index.tsx (struct at L152–186):
      tool_expansion: Schema.optional(Schema.Literals(["auto", "always"])), described as "Start tool call rows expanded instead of collapsed", default auto = today's behavior.
    2. Read it where the row component can already reach it: the session route calls useConfig() and derives its display defaults at L244–249 (config.session?.thinking, config.session?.verbosity). Same pattern, no new plumbing.
    3. Use it as the initial value only: createSignal(config.session?.tool_expansion === "always"). The per-row click toggle stays authoritative, so users can still collapse an individual row.

    The same one-line seam exists in the other two collapsed-by-default tool rows, if you'd rather have one setting cover all tool calls: GenericTool (L2742) and ShellDisplay (L3026). TurnTokenUsage (L1749) is a token table, not a tool row — probably out of scope.

    Environment: opencode 2.2.5, Windows 11 (26100), Windows Terminal.

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