anomalyco / anomalyco/opencode
[FEATURE]: Show the model's context window limit in the TUI (footer and sidebar)
@simonklee is already working on this.
Since Aug 16, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
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
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 of30.0K (15%). - Sidebar context panel:
30,000 / 200,000 tokensinstead of30,000 tokens.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.