Show remaining Codex credits / usage in the CLI statusline
Feature request
Please add a Codex CLI statusline field that shows remaining Codex plan usage / credit balance, similar to how Claude Code surfaces remaining usage directly in the terminal.
Today the CLI can show useful local/session state such as model, reasoning level, current directory, git branch, and context remaining. However, remaining Codex usage or credits are not available as a first-class statusline item. Users have to leave the terminal and open Codex Settings → Usage / Credits to understand whether they are close to a plan or purchased-credit limit.
Why this matters
For long agentic coding sessions, remaining usage is operationally important. It affects whether a user should:
- continue with the current model or switch to a cheaper/smaller one
- enable or avoid fast mode
- compact/reset context before continuing
- pause work before hitting a limit mid-task
- buy credits or wait for included usage to reset
This is especially important because Codex usage varies heavily with task size, context size, model choice, fast mode, and long-running agent workflows.
Suggested statusline fields
Add one or more selectable /statusline fields, for example:
status_line = [
"model-with-reasoning",
"codex-credits-remaining",
"codex-usage-remaining",
"context-remaining",
"current-dir",
]
Possible rendered examples:
gpt-5.4 high · Credits $12.40 · Context 72% left · ~/repo
or
gpt-5.4 high · Codex usage 63% left · Credits $12.40 · ~/repo
Notes
- If exact usage cannot be fetched cheaply or reliably, a stale/last-known value with a timestamp would still be useful.
- If there are separate windows/limits, showing the most constraining limit first would be helpful.
- If an organization/workspace has no credit data available, the field could be omitted or show
usage unavailable. - This is related to broader usage/limits visibility requests such as #15281, but specifically asks for a statusline field so users can monitor budget without leaving the CLI.
Comparison
Claude Code surfaces remaining usage in the terminal. Codex should have comparable terminal-native budget visibility.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗