You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add /codex:usage command to show rate limits and usage #102
There is currently no way to check Codex rate limits and usage from within Claude Code. Users must switch to the Codex TUI and run /status to see how much of their 5h or weekly limit remains. This breaks the workflow when working inside Claude Code with the plugin.
Proposal
In the Codex TUI, /status shows both job status and rate limits together. In the plugin, /codex:status is already taken for job tracking, so this proposes a dedicated /codex:usage command for the rate limit portion:
# Codex Usage
Plan: Plus
Limits:
- 5h limit: 73% left (resets 1 Apr, 18:22)
- Weekly limit: 54% left (resets 5 Apr, 09:15)
- Code review Weekly limit: 91% left (resets 7 Apr, 14:30)
Use an existing CLI subcommand — if codex usage --json or similar already exists and I missed it, the plugin can simply call it via runCommand("codex", ["usage", "--json"]), consistent with how it already calls codex login status.
Add a CLI subcommand first — if no such subcommand exists yet, adding codex usage --json to the Codex CLI (openai/codex) would be the cleanest path. The plugin could then delegate to it without touching auth files directly.
Read auth.json and call the API directly — as a fallback, the plugin can read ~/.codex/auth.json and call the usage endpoint itself. This works today but breaks the plugin's established pattern of delegating all auth to the CLI binary. I have a working implementation of this approach ready as a PR.
Scope
New file: plugins/codex/commands/usage.md
Edit: codex-companion.mjs — add case "usage" handler and update printUsage()
Edit: lib/render.mjs — add renderUsageReport() function
Activity
Add /codex:usage command to show rate limits and usage (openai#102)