Skip to content

[FEATURE] TUI: configurable reasoning bubbles and tool output collapsing #51229

Open

Description

@hopyrez

Feature Request

Currently OpenCode's TUI always streams reasoning tokens (for thinking models) and tool invocations inline, with no way to collapse/hide them. This makes the conversation hard to follow when:

  • Models emit long reasoning chains (Qwen, DeepSeek-R1, etc.)
  • Multiple tool calls produce verbose output

Desired behavior

Add UI config options (e.g. in opencode.json):

{
  "ui": {
    "reasoningDisplay": "bubble",
    "toolsDisplay": "collapse"
  }
}
  • reasoningDisplay: "bubble" | "inline" | "hidden" — in bubble mode reasoning appears in a collapsible bubble that auto-collapses after streaming finishes (click to expand)
  • toolsDisplay: "expand" | "collapse" | "hidden" — tool invocations/results start collapsed, user expands on demand
  • "hidden" — completely suppress (for users who only want final answers)

Use case

  • Reduces visual noise for thinking models
  • Keeps history readable when many tools are called
  • Matches patterns from other AI CLIs where this is configurable

Alternatives considered

  • reasoningEffort: "none" — loses reasoning capability entirely
  • External filtering (| less, scripts) — breaks TUI interactivity

Activity

  1. Nowaker commented on Oct 9, 2026

    @Nowaker

    #54039 adds this to the v1 TUI as a tui.json setting rather than a toggle. tool_output.collapse sets how many lines each tool block shows before Click to expand, per group (bash, generic for plugin and MCP tools, write, edit, apply_patch) or per tool name. 0 collapses a block to just its title or command, so every tool call takes one line until clicked, and "never" keeps it fully expanded. Write, edit and patch blocks gain the expand toggle too. There's no slash command or keybind for a global switch.

    { "tool_output": { "collapse": { "bash": 0, "generic": 0, "write": 0, "edit": 0, "apply_patch": 0 } } }

    This comment is AI generated, but under direct supervision and on request of @Nowaker.

  2. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed request! In short, you'd like settings for how reasoning and tool calls appear in the TUI: shown in full, collapsed after streaming with click-to-expand, or hidden completely.

    Much of this already exists in v2 under the TUI config's session section:

    • session.thinking: "show" or "hide". "hide" is the default and collapses reasoning into a one-line header. You can switch it with /thinking.
    • session.verbosity: "low" summarizes each run of tool calls and thoughts into one line. "medium" and "high" show more.
    • session.grouping: "auto" groups related tool calls together.
    • Long tool and shell output is already cut to a short preview that you can expand.

    If you're on v1 (opencode-ai, versions 0.x/1.x), these options aren't there, so upgrading to v2 (@opencode/cli) should already help.

    What's still missing is a way to hide reasoning or tool output completely, and click-to-expand on single reasoning blocks when thinking is set to "show". Related issues and PRs:

    Maintainers will consider the rest of the request.

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

Metadata

Metadata

Assignees

No one assigned

    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