Skip to content

feat(agent): Codex's plan usage in the usage dialog - #257

Merged
httpsphl merged 1 commit into
mainfrom
feat/codex-plan-meter
Oct 12, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/codex-plan-meter

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

The usage dialog only knew the Claude plan. The Codex app-server answers account/rateLimits/read (no quota cost) and sends account/rateLimits/updated, so the dialog now shows Codex under its own name, with its plan, each window and when a full limit is back.

  • SystemStatus.agentUsage (new), filled from a running Codex agent: read after the handshake, read again on each (sparse) update.
  • Window names follow the Claude ones (300 and 10080 minutes); 43200 is a 30-day window; anything else is named by its minutes. en, pt-BR and es.
  • Spec 30.4 records the real answer of Codex 0.148 for a full free plan.

Checks: cargo test --workspace, clippy, fmt, pnpm check pass; unit tests for the parse, an integration test with the fake process, and a screen test.

Manual step: with a Codex agent running, open Usage from the account menu and see Codex with its plan and window; the usage shows only after a Codex agent has started.

The daemon reads account/rateLimits/read after the handshake and again
on each account/rateLimits/updated, and SystemStatus.agentUsage carries
it. The usage dialog shows Codex under its own name with its plan and
says when the limit is back (a real free plan answered a 30-day window,
full, in seconds).
@httpsphl
httpsphl merged commit 4df8cc6 into main Oct 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant