Your Codex logs already contain your quota meter: how to check where your usage went
Description and use
Codex users can accurately determine token and quota usage by parsing local logs instead of relying on imprecise UI meters.
Problem
Users on ChatGPT Codex plans cannot reliably determine if their quota usage is due to their own prompts or external factors, because screenshots of usage meters are imprecise.
Outcome
Users can now accurately attribute quota consumption to their own activity or external factors, identify inefficiencies such as high cache miss rates or unnecessary context replay, and share findings with support or the community.
Workflow
- Locate the rollout JSONL files under ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (or %USERPROFILE%\.codex\sessions on Windows).
- Parse each event_msg with payload.type "token_count" to extract input_tokens, cached_input_tokens, output_tokens, reasoning_output_tokens, and total_tokens.
- For each rate‑limit window (same window_minutes and resets_at), calculate the highest and lowest used_percent values seen, subtract to get points used, and divide by (tokens ÷ 1,000,000) to get "quota points per 1M tokens".
- Optionally compute points per 1M for uncached input + output to assess cache hit impact.
- Identify steps where used_percent changes without a local call to detect external usage.
- Run the provided Node script (npx github:lowkey-studio/quotatrace --since 30d) to automate the above and generate a Markdown report.
- Attach the report to a GitHub issue or share via the script’s --share option for community analysis.
Evidence
Codex writes one JSONL file per thread under ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (on Windows, %USERPROFILE%\.codex\sessions).
After every model call it appends a token_count event shaped like this...
For each rate‑limit window (same window_minutes and resets_at), take the quota points used (highest minus lowest used_percent you saw) and divide by the tokens logged in that window: quota points per 1M tokens = points used ÷ (tokens ÷ 1,000,000)
I packaged the above as a free, zero‑dependency Node script (disclosure: I built it). It reads the logs locally, never uploads anything, and writes a Markdown report with counts only and hashed session ids, so you can attach it to an issue: npx github:lowkey-studio/quotatrace --since 30d
- Record date: 2026-10-14T10:55:54.886Z