Support cost and budget metrics in TUI status_line
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
Codex TUI currently supports token/context/rate-limit status line items such as context-used, used-tokens, total-input-tokens, total-output-tokens, five-hour-limit, and weekly-limit.
Please add native cost and budget status line items so users can monitor estimated spending directly in the bottom status bar.
Desired status line items:
estimated-cost-current-sessionestimated-cost-todayestimated-cost-monthbilling-budget-limitbilling-budget-usedbilling-budget-remainingbilling-budget-percentrate-limit-reset-timefive-hour-limit-percentweekly-limit-percent
Example display:
GPT-5.5 | team-brain (main) | $34.7 | today:$34.7 mo:$5108.1 | ctx:23.0% | 5h:3.0% reset:4h43m | 7d:21.0%
Requirements:
- Cost should be calculated using the active model provider's actual pricing when available.
- If exact billing data is unavailable, Codex should clearly mark values as estimated.
- Cached input, cache write, output, and long-context multipliers should be handled separately.
- For custom providers, allow users to configure per-model rates in
config.toml. - Status line should expose both compact and detailed forms.
- Values should not leak API keys, organization IDs, or account-sensitive billing metadata.
Why:
Users already see token and context usage in the TUI, but cannot quickly understand cost impact. For long-context coding sessions, cost awareness is important for budget control and model selection.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TUI status_line implementation and the existing context, token, and rate-limit items described in the issue; then inspect config.toml handling for custom-provider rates. Done means compact and detailed cost, budget, reset-time, and percentage items use provider pricing when available, clearly mark estimates otherwise, handle pricing multipliers, and avoid exposing sensitive billing metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100