anomalyco / anomalyco/opencode

[FEATURE]: Show the model's context window limit in the TUI (footer and sidebar)

Open
#42,929 1 comment 0 reactions 1 assignee View on GitHub

@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 of 30.0K (15%).
  • Sidebar context panel: 30,000 / 200,000 tokens instead of 30,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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.