codex-quota

Check OpenAI Codex CLI rate limit status (daily/weekly quotas) using local session logs. Portable Python script.

⭐3stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The codex-quota skill is a dedicated utility designed to monitor OpenAI Codex CLI rate limits by analyzing local session logs. It provides developers with critical visibility into both short-term (5-hour) and long-term (7-day) usage quotas, ensuring seamless workflow management and preventing unexpected API throttling during intensive programming tasks.

Use Cases

  • Pre-Task Quota Verification: Check your remaining weekly and daily limits before starting large-scale code generation projects to ensure your session won't be interrupted.
  • Performance Troubleshooting: Quickly determine if slow response times or errors are caused by hitting API rate limits rather than network or code issues.
  • Multi-Account Resource Management: Monitor and aggregate quota status across multiple OpenAI accounts using the --all flag to optimize resource allocation for team environments.
  • Automated Usage Reporting: Export quota data in JSON format to integrate with personal dashboards or custom monitoring scripts for long-term usage tracking.
namecodex-quota
descriptionCheck OpenAI Codex CLI rate limit status (daily/weekly quotas) using local session logs. Portable Python script.

Skill: codex-quota

Check OpenAI Codex CLI rate limit status.

Quick Reference

# Run the included Python script
./codex-quota.py

# Or if installed to PATH
codex-quota

Options

codex-quota              # Show current quota (cached from latest session)
codex-quota --fresh      # Ping Codex first for live data
codex-quota --all        # Update all accounts, save to /tmp/codex-quota-all.json
codex-quota --json       # Output as JSON
codex-quota --help       # Show help

What It Shows

  • Primary Window (5 hours) — Short-term rate limit
  • Secondary Window (7 days) — Weekly rate limit
  • Reset times in local timezone with countdown
  • Source session file and age

Installation

Copy codex-quota.py to your path:

cp skills/codex-quota/codex-quota.py ~/bin/codex-quota
chmod +x ~/bin/codex-quota

How It Works

Codex CLI logs rate limit info in every session file (~/.codex/sessions/YYYY/MM/DD/*.jsonl) as part of token_count events. This tool:

  1. Finds the most recent session file
  2. Extracts the last rate_limits object
  3. Formats and displays it

When to Use

  • Before starting heavy Codex work (check weekly quota)
  • When Codex seems slow (might be rate-limited)
  • Monitoring quota across multiple accounts