Session stats panel: "Usage" shows context-window fill, not account usage — misleading when the free limit is reached
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend, internationalization
Research direction
Start with gui-plugins/src/context/tab.tsx and trace how the session stats labels are rendered; the issue identifies the values and suggested replacements. Check the Russian translations in app/src/runtime/i18n/ru.ts for the missing command.usage.view entries. Done when the stats distinguish context fill from account quota and the usage command has Russian labels.
Written by the indexing model from the issue text.
Description
Description
The Context tab session stats panel uses labels that look like account limits, but they
measure the model's context window.
For opencode/deepseek-v4.1-flash-free it shows:
Лимит контекста (Context limit): 200 000
Всего токенов (Total tokens): 70 442
Использование (Usage): 35 %
while requests fail at the same time with "Free usage limit reached ... subscribe to
OpenCode Go", so it reads as if most of the allowance is still left.
Cause: gui-plugins/src/context/tab.tsx (SessionContextTab) computes
total = input + output + reasoning + cache.read + cache.write for the last assistant
message, then usage = round(total / model.limit.context * 100). The math is correct,
but "Total tokens" is the current context size, not the session total (97 messages,
70 442 tokens), and "Usage" is context-window fill, not quota.
Suggested renames: "Usage" -> "Context fill", "Total tokens" -> "Last turn tokens",
"Context limit" -> "Model context window".
Same area, minor: command.usage.view and command.usage.view.description are missing from
app/src/runtime/i18n/ru.ts, so the command stays English in the palette, while
dialog.usageExceeded.freeTier.* is translated ("Достигнут бесплатный лимит" — "Free limit
reached").
Note: the free allowance isn't available to the panel anyway — GET
/api/experimental/usage/limits returns only the Console workspace and budgets: [].
Plugins
OpenCode version
OpenCode version: 2.2.5 (Desktop)
Steps to reproduce
- OpenCode Desktop 2.2.5, UI language Russian
- Open a session using opencode/deepseek-v4.1-flash-free
- Open the Context tab -> session stats
- Exhaust the free allowance so requests fail with "Free usage limit reached"
- The stats panel still shows "Использование 35 %" ("Usage 35 %")
Screenshot
Operating System
Windows 10
Terminal
OpenCode Desktop (GUI, not a terminal)
- Dominant language
- TypeScript
- Stars
- 224k
- Forks
- 30k
- Avg merge
- 4h 44m
- Merged PRs (30d)
- 513
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from anomalyco/opencode
-
pending close triaging
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode#62582 · 1 comment ·
Maintainers usually reply within 1 day
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#62516 · 2 comments ·
Maintainers usually reply within 1 day
-
pending close triaging
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#62403 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode#62362 · 1 comment ·
Maintainers usually reply within 1 day
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
anomalyco/opencode#62343 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
callstack/react-native-paper#5189 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
live-codes/livecodes#1079 · 1 comment ·
Maintainers usually reply within 1 day
-
Add: ESP 2 ROOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day