Skip to content

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

Description

@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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaycontextIssues related to context management (including compaction)enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions