Status UI mixes current context-window usage with cumulative token totals

Open 💬 3 comments Opened May 8, 2026 by qsunyi
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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% left
  • Context 24% used
  • 998K window
  • 15.6M used
  • 15.5M in
  • 82.7K out

This makes it appear as if the context window is both:

  • 249K / 998K used
  • 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:

  1. Current context window usage
  • for example 249K / 998K
  • or 24% used / 76% left
  1. 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% used
  • 998K window
  • 15.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:

  1. Rename cumulative counters more explicitly, for example:
  • session tokens used
  • thread input total
  • thread output total
  1. Keep current-window metrics grouped together and visually separated from cumulative totals.
  1. 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.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #21324

Powered by Codex Action

wezzle · 3 months ago

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 /status command.

Example output:

Context 68% left (91.6K used / 258K)

The intent is to make the scope explicit:

  • context-window-usage: current active context-window occupancy
  • existing total/input/output token items: cumulative token counters

The patch currently:

  • adds a new context-window-usage statusline item;
  • uses the existing context-window and token-usage helpers;
  • adds setup/preview support;
  • adds TUI test coverage for the rendered value.

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 required codex-tui checks/snapshots, and open a PR if invited.

ravihammond · 1 month ago

Just commenting on this, because I really want this feature!