Skip to content

Support cost and budget metrics in TUI status_line #38721

Description

@thinker0

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-session
  • estimated-cost-today
  • estimated-cost-month
  • billing-budget-limit
  • billing-budget-used
  • billing-budget-remaining
  • billing-budget-percent
  • rate-limit-reset-time
  • five-hour-limit-percent
  • weekly-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.

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 displayenhancementNew feature or requestrate-limitsIssues related to rate limits, quotas, and token usage reporting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions