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]: Show the model's context window limit in the TUI (footer and sidebar) #42929
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The TUI usage counter shows the current session's token usage with a percentage, e.g. 30.0K (15%), but there is no visible reference for what that percentage is relative to — the model's context window limit is not shown anywhere in the TUI.
Without the limit, it's hard to judge how much room is left in the context window, which matters in long sessions where compaction kicks in near the limit.
Requested: show the model's context window limit alongside the token count in both places the usage counter appears:
Input bar / prompt counter: 30.0K / 200K (15%) instead of 30.0K (15%).
The limit comes from the active model's limit.context (models.dev / provider config). Models without a known limit should keep the current behavior (token count + percentage only).
Related: builds on #13003 (display token usage in the TUI — its status-bar option already sketches Tokens: 19.9K/1M). #33745 asked for the utilization percentage, which the TUI now already shows; this request is specifically about the absolute context window limit.
If your request is meaningfully distinct from these (e.g., specifically the absolute limit value shown inline in the prompt bar and sidebar counter), feel free to clarify how it differs.
changed the title [-][FEATURE]: Show the model's context window limit in the TUI usage counter[/-][+][FEATURE]: Show the model's context window limit in the TUI (footer and sidebar)[/+]on Aug 16, 2026
This adds exactly what's requested — an OpenTUI sidebar showing the model's
context window, current usage, and a per-category breakdown, live per session.
I've built it as a plugin — opencode-context-indicator. Still in a testing
stage; with your help and feedback we can make it better together.
real-time sidebar: model · ctx/limit (%) · user / assistant / reasoning /
tool args / system / tool schemas / residual
/context — instant 3-line summary; /context-breakdown — full table for the
session and all subagent sessions
dual V1 + V2, tested against opencode 2.0.21+; everything stays local
(estimates, no uploads, no extra LLM calls)
Thanks for the suggestion, @Haltarys! You're asking for the TUI to show the active model's context window limit next to the token count: 30.0K / 200K (15%) in the prompt footer and 30,000 / 200,000 tokens in the sidebar context panel. Models without a known limit would keep the current format.
The percentage is already calculated from the model's limit.context, but the limit itself isn't shown anywhere. Maintainers will consider this.
Activity
github-actions commentedon Aug 16, 2026
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: Display token usage information in the TUI— predecessor feature for showing token usage in the TUI (referenced in your issue)[FEATURE]: Show context usage in OpenCode Desktop, including for local OpenAI-compatible models— requests showing context usage including for local models[FEATURE]: Surface compaction progress and live context usage in the TUI— overlapping request to surface live context usage in the TUIFeature: Show context/output limits in /models command— related request to show context/output limits (in the /models command rather than the usage counter)If your request is meaningfully distinct from these (e.g., specifically the absolute limit value shown inline in the prompt bar and sidebar counter), feel free to clarify how it differs.
[-][FEATURE]: Show the model's context window limit in the TUI usage counter[/-][+][FEATURE]: Show the model's context window limit in the TUI (footer and sidebar)[/+]VladSmr commentedon Oct 2, 2026
This adds exactly what's requested — an OpenTUI sidebar showing the model's
context window, current usage, and a per-category breakdown, live per session.
I've built it as a plugin — opencode-context-indicator. Still in a testing
stage; with your help and feedback we can make it better together.
tool args / system / tool schemas / residual
session and all subagent sessions
(estimates, no uploads, no extra LLM calls)
https://github.com/VladSmr/opencode-context-indicator
npm: opencode-context-indicator
opencodejr commentedon Oct 28, 2026
Thanks for the suggestion, @Haltarys! You're asking for the TUI to show the active model's context window limit next to the token count:
30.0K / 200K (15%)in the prompt footer and30,000 / 200,000 tokensin the sidebar context panel. Models without a known limit would keep the current format.The percentage is already calculated from the model's
limit.context, but the limit itself isn't shown anywhere. Maintainers will consider this.Related issues:
19.9K/1M)