Track your Codex usage | LangWatch
Track your Codex Usage
Or Claude Code, OpenCode, Copilot, Cursor and Pi. Capture full trace history to improve your flow, and track how much you're spending in tokens.
Start tracking right away:
$npx langwatch codex
Trace Information
| Origin | Duration | Cost | Tokens | Model |
|---|---|---|---|---|
| Coding Agent | 2307.1s | $221.02 | 488.8K Input, 203,866 Output | gpt-5.6-sol |
| Coding Agent | 5623.4s | $801.75 | 531.6K Input, 244,118 Output | gpt-5.6-sol |
| Coding Agent | 513.9s | $14.96 | 59.9K Input, 18,204 Output | gpt-5.5-mini |
| Coding Agent | 1543.9s | $68.51 | 214.6K Input, 84,112 Output | gpt-5.6-sol |
| Coding Agent | 1534.3s | $41.87 | 261.6K Input, 96,441 Output | gpt-5.5-mini |
| Coding Agent | 374.9s | $9.12 | 33.5K Input, 12,904 Output | gpt-5.6-sol |
Query Examples
Input: I did the gcloud auth login hopefully you can continue?
Output: The scan came back empty: no project in your account has the Google Ads API enabled at all, which actually pins the diagnosis. Modern Ads API accounts declare their Cloud project explicitly in th…
Input: I have several design change requests here ![Image #7]
Output: All three are in: clawd is a die-cut sticker on the right with the slow wobble, the trace colors match the app tokens, and the span tree groups repeats with ×N pills…
Input: ok merged! but /reuse-worktree cuz already found a bug
Output: Worktree reset to latest main on a fresh branch. The bug reproduces: the retry queue drops the last event when the worker restarts. Writing the failing test first, fix goes on the same PR…
Input: awesome, this is merged, but apply gave those errors:
Output: Both errors share one root cause: the migration runs before the enum exists. Reordered the migrations, apply is clean, and the seed passes on a fresh database…
Input: can you get rid of all those stale artifacts? clean them up, maybe commit first…
Output: Committed the WIP first, then removed 14 stale artifacts: 9 orphaned preview deploys, 3 dangling worktrees, 2 cache volumes. 4.2GB freed, nothing CI references…
Features
Tokens 124 in · 7.9K out Models gpt-5.6-sol +1
Input: 124
Output: 7,852
How do I track my Codex usage?
Run npx langwatch codex. It configures the OpenTelemetry exporters Codex ships in config.toml to point at LangWatch. Every session lands as a trace: model turns, tool calls, tokens by class, and theoretical cost.
Does it work with Claude Code, OpenCode, Copilot, Cursor, and Pi?
Yes. Each agent exports through the same OTLP endpoint, so everything lands in one store with the same token, cost, and trace treatment.
What does the "Bundled" cost label mean?
Sessions on a ChatGPT plan (Plus, Pro, Team) have no per-token invoice. LangWatch marks those sessions Bundled and computes a theoretical total at API list prices, per token class. That is the number behind "what would this have cost on the API".
Are cached tokens counted?
Cache read and cache write are separate token classes on every span, priced at their own rates.
What if I accidentally paste any secret keys on my Codex session?
API secrets are automatically redacted and never stored on the LangWatch side. PII is redacted the same way, so personal information does not end up in the trace.
One command, then keep working.
Free for individual use. Setup docs
$npx langwatch codex