Skip to content

Feature: Expose full usage/limits data in CLI (/status command) #15281

Done

Description

@milord-x

Problem

The current /status command in Codex CLI only shows limited information in the status bar:

  • Model name
  • Current usage percentage (often inaccurate or stale)
  • Working directory

However, users with ChatGPT Plus subscription (which includes Codex CLI) have important usage limits that are NOT visible via CLI:

  1. 5-hour rolling window limit - resets every 5 hours
  2. Weekly limit - resets weekly (typically Sunday)

These limits are only visible via the web interface at https://chatgpt.com/codex/settings/usage.

Current workaround limitations

The /status status bar shows something like:

gpt-5.4 high · 100% left · ~

But this data is:

  • Often inaccurate/stale
  • Doesn't include weekly limits
  • Requires manual browser check for real usage data

Feature Request

Add comprehensive usage data to the /status command (or create a new command like /usage):

Proposed Output Format

/codex /status

╭─────────────────────────────────────────────────────────────────────────────────╮
│  >_ OpenAI Codex (v0.116.0)                                                     │
│                                                                                 │
│  Model:                gpt-5.4 (reasoning high, summaries auto)                 │
│  Directory:            ~/projects/myapp                                        │
│  Account:              [email protected] (Plus)                                 │
│                                                                                 │
│  5h limit:             [███████████████████░░] 82% left (resets 15:18)         │
│  Weekly limit:         [███████░░░░░░░░░░░░░░] 36% left (resets 03:08 on 22 Mar) │
╰─────────────────────────────────────────────────────────────────────────────────╯

Technical Implementation Options

  1. Direct API call: The CLI could make an authenticated request to fetch real-time usage data from OpenAI's internal endpoints (similar to what the web UI uses)

  2. New /usage command: A dedicated command that shows only usage information

  3. Enhanced /status output: Expand the existing status panel with full usage details

Why This Matters

  • Users frequently hit usage limits unexpectedly
  • No CLI-native way to check remaining quota
  • Forces users to open browser just to check limits
  • Poor user experience for CLI-focused workflow

References


Environment:

  • Codex CLI version: 0.116.0
  • Auth method: ChatGPT Plus subscription
  • Platform: Linux (Arch)

Activity

  1. added
    enhancement
    CLI
    rate-limits
    on Mar 20, 2026
  2. etraut-openai commented on Mar 20, 2026

    @etraut-openai
    Contributor

    You can configure the CLI to display the usage limits in the status line using the /statusline command and selecting five-hour-limit and/or weekly-limit.

  3. ralan2008kz-tech commented on Mar 20, 2026

    @ralan2008kz-tech

    Люди которые

  4. added
    TUI
    and removed
    CLI
    on Mar 27, 2026
  5. Eric-Terminal commented on May 22, 2026

    @Eric-Terminal

    Thanks @etraut-openai — the /statusline items are useful, and I've been using five-hour-limit + weekly-limit myself. Just wanted to share a few thoughts on why a dedicated /usage surface might still be worth keeping on the table, alongside the statusline approach.

    A pane (or /status --detailed) could cover a few cases that a single statusline row can't easily handle:

    • Multiple limits + reset times side by side — 5h, weekly, weekly-Sonnet (Max/Team), Extra usage / credits (Pro/Max), each with its own reset timestamp in the user's timezone. Statusline tends to truncate when several of these stack up.
    • Plan-aware rows — the Sonnet bar is redundant for Plus users, Extra usage only matters for Pro/Max. Conditional rendering feels more natural in a pane.
    • Discoverability — /usage is self-documenting; statusline items require users to know they exist and opt in.

    Implementation-wise the data already lives in rate_limit_snapshot (same payload behind the current statusline items and the JSON shape @alwint3r outlined in #20310), so this is largely a TUI addition rather than new plumbing.

    For inspiration there's a fairly polished version in Claude Code's components/Settings/Usage.tsx — the eighth-block Unicode glyphs (▏▎▍▌▋▊▉█) give ~1/8-cell precision in about 30 lines and would port cleanly to a small ratatui widget.

    One open question: would the team prefer a new /usage command or a --detailed flag on /status? Either pattern works; the answer probably depends on cross-surface consistency goals. Happy to also move this to a separate enhancement issue if that fits better — just didn't want to fragment the discussion away from here by default.

    If the direction looks aligned and you'd welcome a contribution, I'm glad to put together a small prototype gist first (eighth-block widget rendered against mocked snapshot data) so the visual is concrete before any PR discussion. For what it's worth on the process side, I'm an active Linux kernel contributor, so the atomic-commit / patch-series review workflow in the contributing guide is familiar ground.

  6. drogers0 commented on Jun 3, 2026

    @drogers0

    For the scripted/external slice of this, complementing the /statusline pointer above: I built aistat, which reads the same account/rateLimits/read endpoint. The human view across accounts:

    $ aistat -h
    Claude usage
    - [email protected] (active) [Max 5x]
      - 5-hour: 92.0% (resets in 4h 53m)
      - 7-day: 71.0% (resets in 2d 5h)
    - [email protected] [Max 20x]
      - 5-hour: 4.0% (resets in 4h 12m)
      - 7-day: 12.0% (resets in 5d 9h)
    
    Codex usage
    - [email protected] (active) [Pro]
      - 5-hour: 25.0% (resets in 5h 16m)
      - 7-day: 18.0% (resets in 4d 18h)

    and the same data as JSON for the scripted case:

    $ aistat usage codex
    {
      "checked_at": "2026-05-29T18:21:04+00:00",
      "providers": {
        "codex": {
          "accounts": [
            {"email": "[email protected]", "plan": "Pro", "active": true,
             "limits": {
               "five_hour": {"used_percent": 25.0, "remaining_percent": 75.0, "resets_at": "2026-05-29T23:36:34+00:00", "reset_after_seconds": 18930},
               "seven_day": {"used_percent": 18.0, "remaining_percent": 82.0, "resets_at": "2026-06-03T05:40:37+00:00", "reset_after_seconds": 472773}
             }}
          ]
        }
      }
    }

    /statusline items are still the right answer for in-CLI rendering; this is just for the external case. The same binary covers Claude too.

    https://github.com/drogers0/aistat

  7. CreepyGnome commented on Jun 15, 2026

    @CreepyGnome

    This is about programmatically getting the 5 hour and weekly usage status via the codex CLI so you can get them from lets say a python script and use in a skill or something.

    Right now GPT5.5 has no way to know what the current usage limits are for 5 hour or weekly so it makes it horrible to plan orchestration of subagents as you risk having to restart partial work and waste do those tasks over again.

    The original request as written is what is requested by the original post I assume, so while its nice people are trying to tell how to use statusline but that will not resolve this issue.

    I am surprised that this was not already a thing, and I am surprised that you do not have a tool the AI can use in your harness to read current usage. It would be amazing if it can get this data to better manage subagents and know when to pause.

  8. etraut-openai commented on Nov 27, 2026

    @etraut-openai
    Contributor

    Run /status while signed in with ChatGPT. When your account reports five-hour and weekly limits, the status card shows the percentage remaining and the reset time for each window.

    Closing as implemented. If a limit appears on the web but is missing from /status, please report that discrepancy with your CLI version and plan.

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

    TUIenhancementrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions