Status UI mixes current context-window usage with cumulative token totals
Summary
The status UI appears to mix current context-window usage with cumulative token totals from a broader scope, which makes the displayed context usage look inconsistent.
In one session, /status showed:
Token usage: 844K total (762K input + 82.7K output)Context window: 76% left (249K used / 998K)
At the same time, the bottom status bar showed:
Context 76% leftContext 24% used998K window15.6M used15.5M in82.7K out
This makes it appear as if the context window is both:
249K / 998Kused- and also
15.6M used
Those clearly are not the same metric, but the UI presents them close together without enough distinction.
Expected behavior
The UI should clearly separate:
- Current context window usage
- for example
249K / 998K - or
24% used / 76% left
- Cumulative session or thread token totals
- for example total input/output tokens accumulated over time
These should not look like competing values for the same context window.
Actual behavior
Different token counters appear to be shown together in the status UI, but they seem to come from different accounting scopes:
- current active context window occupancy
- cumulative token totals for a longer-lived session/thread
Because the labels are not explicit enough, the display looks internally inconsistent.
Why this is confusing
A user naturally reads:
Context 24% used998K window15.6M used
as if they all describe the same resource, which is impossible.
This looks either like:
- a display bug
- or a UX/labeling bug where metrics with different scopes are mixed together without clarification
Environment
- Codex CLI version:
v0.129.0 - Platform: macOS
Suggested fix
Possible fixes:
- Rename cumulative counters more explicitly, for example:
session tokens usedthread input totalthread output total
- Keep current-window metrics grouped together and visually separated from cumulative totals.
- Consider not showing cumulative token counters next to context-window metrics by default.
Additional note
This looks consistent with the UI combining at least two different data sources:
- current context-window occupancy
- cumulative token totals over a broader scope
So the issue may be more about display semantics than raw arithmetic.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the detailed report — I’m seeing the same UX issue.
I have a small local patch that adds a separate configurable statusline item for the current context window usage, so users can display the percent and absolute token values together instead of reading them alongside the cumulative token counters. The output uses the same structure as the
/statuscommand.Example output:
The intent is to make the scope explicit:
context-window-usage: current active context-window occupancyThe patch currently:
context-window-usagestatusline item;Would this direction align with the Codex team’s preferred fix for this issue? If so, I’d be happy to clean it up against
main, run the requiredcodex-tuichecks/snapshots, and open a PR if invited.Just commenting on this, because I really want this feature!