Track Codex Tokens with Absolute Numbers

Published 20 May 2026

OpenAI Codex tells you "70 % consumed." It does not tell you how many tokens that is. 70 % could be 300,000 tokens or 3,000,000 tokens. The difference matters when you are budgeting a multi-file refactor or comparing Codex against Claude Code on the same task.

This guide shows how to track Codex tokens with real numbers — input, output, and cost — not just percentages.

1. Why Codex Hides the Number

Codex's /status command shows subscription tier usage as a percentage. This is by design:

But it has hard limits:

2. Where Codex Writes the Real Data

Codex logs every interaction to local JSONL files:

~/.codex/sessions/**/*.jsonl

Each event contains:

These files are on your machine. Codex normally keeps these local session logs unless you or the tool clean them up. You own this data.

3. How to Read the Logs Manually

One event looks like this:

{
  "type": "event_msg",
  "payload": {
    "type": "token_count",
    "info": {
      "last_token_usage": {
        "input_tokens": 4523,
        "cached_input_tokens": 3200,
        "output_tokens": 891,
        "reasoning_output_tokens": 120,
        "total_tokens": 5534
      }
    }
  },
  "timestamp": "2026-05-20T10:30:00Z"
}

To get a daily total, you would:

  1. Find all *.jsonl files under ~/.codex/sessions/
  2. Parse each JSON line
  3. Sum input_tokens and output_tokens by date
  4. Multiply by the model's per-token cost

This is tedious. A token tracker automates it.

4. What TokenBBQ Shows You

TokenBBQ reads Codex's session JSONL files automatically and serves:

5. Codex vs. Claude Code: Token Profiles

Cost note: exact cost depends on the model name, cached input, reasoning tokens, and the current pricing table. TokenBBQ fetches LiteLLM pricing when available and leaves unknown model prices at $0 rather than guessing.

6. Quick Start

npx tokenbbq@latest

No install. No config. No API key. Dashboard opens in browser.

TokenBBQ dashboard tracking Codex tokens with absolute numbers
TokenBBQ — track Codex tokens in absolute numbers, not percentages

7. Related Guides

Stop guessing what 70% means

Open-source · MIT · Local-only · No sign-up

Get TokenBBQ →