Add raw context-token counts to the configurable TUI status line

Open 💬 0 comments Opened Aug 3, 2026 by Polarrr-hub

What variant of Codex are you using?

Codex CLI/TUI 0.146.0 on Windows.

What feature would you like to see?

Add persistent status-line items that show the active context window in token counts rather than percentages, for example:

Context 93,534 used / 164,466 left / 258,000 window

Possible configurable item IDs:

[tui]
status_line = ["context-used-tokens", "context-remaining-tokens", "context-window-size"]

The current status-line choices do not provide this:

  • context-used and context-remaining show percentages only.
  • context-window-size shows capacity.
  • used-tokens is cumulative session usage, not active context occupancy, so it diverges after compaction and can exceed the context-window size.

The new values should use the active/last context usage that currently drives context-used and context-remaining, not cumulative total_token_usage.

Suggested acceptance criteria:

  • Show active context used and remaining as token counts.
  • Update after every usage event and after context compaction.
  • Keep the values distinct from cumulative input/output/session token counters.
  • Omit them when the model context window or active usage is unknown, consistent with existing context status items.
  • Document the new item IDs alongside the existing /statusline options.

This would let users judge exact context pressure and compaction headroom without estimating from a rounded percentage.

Additional information

A duplicate search found broader context-telemetry requests, but none for raw active-context token counts in the configurable CLI/TUI status line.

View original on GitHub ↗