Skip to content

[FEATURE]: Persist TUI thinking block visibility toggle or add config option #4582

Closed

Description

@ben-vargas

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

Note: This is different from #2875, which requests controlling the model's thinking mode. This request is specifically about TUI rendering of thinking blocks, not about toggling the model's thinking behavior.

Current Behavior

The TUI already has a runtime toggle for thinking block visibility (accessible via Ctrl+P → "Toggle thinking blocks" or the /thinking command). However, this preference is not persisted between sessions. Every time you start a new session or restart OpenCode, thinking blocks are shown by default regardless of your previous preference.

Requested Enhancement

Add one or both of the following:

  1. Persist the runtime toggle (similar to how sidebar visibility is persisted using kv store)

    • When users toggle thinking block visibility via the command palette or /thinking command, save this preference
    • Apply the saved preference when starting new sessions
  2. Add a config option to set the default behavior

    {
      "tui": {
        "show_thinking": false  // default: true
      }
    }

Rationale

Users who prefer a cleaner view without thinking blocks currently have to manually toggle them in every session. The sidebar already has this persistence behavior, so thinking block visibility should work similarly for consistency.

Implementation Notes

The sidebar persistence can be found at packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:110-111 where it uses:

const [sidebar, setSidebar] = createSignal<"show" | "hide" | "auto">(kv.get("sidebar", "auto"))

And persists changes via kv.set("sidebar", ...) on toggle.

Activity

  1. self-assigned this
    on Nov 21, 2025
  2. added a commit that references this issue on Nov 28, 2025
    33c63be
  3. added a commit that references this issue on Nov 29, 2025
    b0c12ca
  4. added a commit that references this issue on May 5, 2026
    3421ac9
  5. added a commit that references this issue on Jun 14, 2026
    6023815
  6. added a commit that references this issue on Jul 31, 2026
    56ed4b9
  7. added a commit that references this issue on Sep 6, 2026
    d0b3952
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