You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Compact one-line display for the sidebar Context block #53200
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The session sidebar's Context block takes four lines for three numbers:
Context
175,019 tokens
18% used
$1,215.20 spent
On a short terminal, or with many MCP/LSP/todo entries, those lines push the rest of the sidebar down, and the block can't be collapsed the way MCP, LSP, and Modified Files can.
Proposal:
A tui.json option, sidebar.context: "expanded" (default, today's layout) or "compact".
compact puts everything on one line and uses the most detailed form that fits the sidebar width:
175,019 tokens · 18% used · $1,215.20 spent
175,019 · 18% · $1,215.20
175K · 18% · $1,215
Add the same ▼/▶ arrow the other sidebar sections use. Clicking it switches between the two modes. There is also a command palette entry ("Compact/Expand sidebar context", bindable as sidebar_context_toggle). The runtime choice is persisted in kv, like other TUI toggles.
The default stays exactly as it renders today, apart from the new arrow.
Thanks for the detailed proposal! The request is an optional one-line layout for the sidebar Context block that uses shorter forms as the sidebar narrows, plus a ▼/▶ toggle and a palette command, with the choice remembered. Maintainers will consider it. I see you've already opened #54966 for it.
Until then, you can get this now with a CLI plugin. The Context block is itself the built-in plugin opencode.sidebar.context, so you can turn it off and drop in a replacement. I've type-checked this plugin but haven't run it in a real TUI yet.
Turn off the built-in block in ~/.config/opencode/cli.json:
{
"plugins": ["-opencode.sidebar.context"]
}
Save the plugin as ~/.config/opencode/plugins/sidebar-context-compact/tui.tsx:
Clicking ▼/▶ Context switches between the layouts, and the choice is saved in plugin storage. The palette also gets Compact/Expand sidebar context, under the command ID sidebar_context_toggle, which you can bind in keybinds. To start in compact mode, load the plugin through the object form with "options": { "mode": "compact" }.
Activity
github-actions commentedon Oct 4, 2026
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
opencodejr commentedon Oct 27, 2026
Thanks for the detailed proposal! The request is an optional one-line layout for the sidebar Context block that uses shorter forms as the sidebar narrows, plus a ▼/▶ toggle and a palette command, with the choice remembered. Maintainers will consider it. I see you've already opened #54966 for it.
Related issues:
Until then, you can get this now with a CLI plugin. The Context block is itself the built-in plugin
opencode.sidebar.context, so you can turn it off and drop in a replacement. I've type-checked this plugin but haven't run it in a real TUI yet.~/.config/opencode/cli.json:{ "plugins": ["-opencode.sidebar.context"] }~/.config/opencode/plugins/sidebar-context-compact/tui.tsx:Clicking ▼/▶ Context switches between the layouts, and the choice is saved in plugin storage. The palette also gets Compact/Expand sidebar context, under the command ID
sidebar_context_toggle, which you can bind inkeybinds. To start in compact mode, load the plugin through the object form with"options": { "mode": "compact" }.