Add Enterprise monthly credit limit to /statusline
Open 💬 2 comments Opened Jun 26, 2026 by ksiom
What variant of Codex are you using?
CLI
What feature would you like to see?
I’d like /statusline to support showing the Enterprise monthly credit limit, similar to the existing 5h and weekly limit items.
Current behavior:
/statuscan show Enterprise monthly credit limit data./statuslinecan show short limit summaries for other limits.- There is no dedicated
/statuslineitem for the Enterprise monthly credit limit.
Requested behavior:
- Add a new
/statuslineitem namedmonthly-limit. - Display it in the same short style as other limit items, for example:
monthly 68% left- Refresh the value as other limit items.
This would make Enterprise monthly usage visible in the footer without having to manually run /status.
Additional information
_No response_
2 Comments
I put together a focused patch for this here:
https://github.com/openai/codex/compare/main...Nicolas0315:codex/statusline-monthly-limit?expand=1
What it does:
/statuslineitem with idmonthly-limitmonthly N% leftfrom the existing Enterprise spend-controlindividual_limitsnapshot when availableVerification:
just fmt,git diff --check,cargo test --manifest-path codex-rs\Cargo.toml -p codex-tui monthly_limit -- --nocapture,cargo test --manifest-path codex-rs\Cargo.toml -p codex-tui status_surface_preview -- --nocapture,cargo test --manifest-path codex-rs\Cargo.toml -p codex-tui status_line_setup -- --nocapture,cargo check --manifest-path codex-rs\Cargo.toml -p codex-tuicyberagent-mac-m5max: fetched655274f13,git diff --check origin/main...HEAD, monthly-limit focused tests, status-surface preview tests,cargo check --manifest-path codex-rs/Cargo.toml -p codex-tuinicolas2025: fetched655274f13,git diff --check origin/main...HEAD,cargo check --manifest-path codex-rs\Cargo.toml -p codex-tuinicolas-macbook-pro: fetched655274f13,git diff --check origin/main...HEAD; Rust toolchain unavailable on this host, so cargo checks were skipped therertx5060ti: fetched655274f13,git diff --check origin/main...HEAD; cargo check is blocked by this host's linker setup (link.exerejects MSVC linker flags, cargo exit 101), and I confirmed no lingering cargo/rustc/link processes remainedorigin/main(812cd2bb5) merge-tree check: no conflictsI’m seeing the same need in a managed ChatGPT Enterprise workspace.
In this workspace,
/statusexposes the monthly allowance throughindividualLimit, but/statuslinehas no corresponding item. I traced the existing TUI data flow and verified a small local, TUI-only prototype that:monthly-credit-limitstatusline item;individualLimit.remaining_percentasmonthly N% left;individualLimitis unavailable; andSmall follow-up: I’ve published the tested proof of concept here:
The patch is based on the current upstream
mainand keeps the monthly workspace spend-control value independent from rolling rate-limit windows.Local verification:
just test -p codex-tui: 3,358 passed, 4 skippedcargo build -p codex-clijust fix -p codex-tuijust fmtOne naming consideration: I would prefer
monthly-credit-limitover the more genericmonthly-limit. This value comes from optional workspace spend-control data, rather than a monthly rolling rate-limit window. I also think the picker item should remain selectable even when the value is unavailable; conditionally omitting the rendered segment keeps the configuration stable across account or workspace changes.I have local coverage for rendering, unavailable data, boundary values, and coexistence. I understand that external code contributions are invitation-only; if this direction aligns with the intended UX, would an invited PR be welcome?
<img width="1247" height="452" alt="Image" src="https://github.com/user-attachments/assets/f0c8502f-935d-4c54-adc4-50a13a91f773" />