Claude Code Usage & Codex Usage Cost Meter
See today's Claude Code and Codex tokens, estimated cost, the Claude Code 5-hour block and the Codex rate limits in the VS Code status bar, read offline from your own session files.

The screenshot is the extension running in VS Code 1.142 on synthetic session folders made by scripts/make-fixtures.js. No real session was used.
Why use it
- Both tools in one place. Claude Code and Codex usage sit side by side in the status bar and in one dashboard, so you don't need two meters.
- You see the limits coming. The status bar counts down the Claude Code 5-hour block and shows how much of the Codex 5-hour and weekly limits is used, with the reset times.
- Your prompts stay private. The extension reads only token counts, model ids, times and folder paths. It never shows or stores prompt or reply text, makes no network calls and needs no API key.
- It stays light. It remembers where it stopped in each file and reads only the new lines, so a 2 GB history doesn't get read again every minute.
Not affiliated with Anthropic or OpenAI. Claude Code and Codex are their makers' products, named here only to say what this extension reads.
Quick start
- Install the extension. The status bar item appears at the bottom right once it has read your session folders.
- Click it to open the dashboard, or run "AI Usage: Open Usage Dashboard".
The status bar

The item reads like Claude 1.2M $3.40 · Codex 410k $0.62 · 2h 13m · Codex 5h 43% wk 71%. The clock part is the time left in the current Claude Code 5-hour block. Hover for the full split and the reset clock times. The item turns yellow when a Codex limit reaches 90%.
The dashboard
- Tiles for today per tool, the 5-hour block (tokens, cost and a meter for the time used) and each Codex limit.
- A stacked bar chart per day for the last 7, 14, 30 or 90 days, in tokens or in estimated cost. Hover a day for its numbers.
- Tables by tool, by project folder, by model and by day. Each has input, output, cache write, cache read, total and estimated cost.

In a narrow editor the tiles stack, the chart redraws to fit and wide tables scroll sideways.

How the numbers are worked out
- Claude Code writes
usage on each assistant message in ~/.claude/projects/<folder>/<session>.jsonl. A message that was written more than once (while it streamed, or again in a resumed session) counts once. Subagent files count too.
- Codex writes running totals in
token_count events in ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. Each event adds what grew since the one before, so repeated events don't double count. Codex rate limits come from the newest event that has them. When a window has already reset, the meter says so instead of showing an old percentage.
- The 5-hour block starts at the hour of your first Claude Code message after a break and lasts 5 hours. It's worked out from local timestamps, so it can differ a little from what Anthropic's servers count.
- Days follow your computer's time zone.
- Records the extension doesn't know and lines that aren't valid JSON are skipped.
Cost is an estimate
Cost is tokens times a price table in US dollars per million tokens. The built-in prices were taken on 2026-11-06. Change any row, or price a model the table doesn't know, in the aiUsageMeter.prices setting. Models without a price still count tokens and are listed under the dashboard. On a Pro, Max or ChatGPT plan you aren't billed per token, so treat the cost as what the same work would cost on the API.
Settings
| Setting |
Default |
What it does |
aiUsageMeter.showClaudeCode |
true |
Show Claude Code usage. |
aiUsageMeter.showCodex |
true |
Show Codex usage and limits. |
aiUsageMeter.statusBar |
true |
Show the status bar item. |
aiUsageMeter.statusBarCost |
true |
Show the estimated cost in the status bar. |
aiUsageMeter.refreshSeconds |
60 |
Read new lines at least this often. File changes trigger a read within 2 seconds. |
aiUsageMeter.historyDays |
90 |
Days of history to read. Older files are skipped. |
aiUsageMeter.prices |
{} |
Your price rows, by model id or prefix. |
aiUsageMeter.claudeRoots |
[] |
Claude Code project folders. Empty means $CLAUDE_CONFIG_DIR/projects, else ~/.claude/projects. |
aiUsageMeter.codexRoots |
[] |
Codex session folders. Empty means $CODEX_HOME/sessions, else ~/.codex/sessions. |
aiUsageMeter.askForRating |
true |
Ask once for a Marketplace rating after a few days of use. |
aiUsageMeter.showSupportLinks |
true |
Show the Sponsor and More free viewers links under the dashboard. |
Privacy
The extension only reads files. It doesn't write, move or delete session files, it sends nothing anywhere and it has no telemetry. Lines that can't hold usage data are skipped before they're parsed. The dashboard runs under a strict Content Security Policy with no remote content.
Known limits
- Usage made on another computer, or in claude.ai and ChatGPT, isn't in your local files, so it isn't counted.
- Claude Code doesn't write its own limit percentage to disk, so the 5-hour block shows time and tokens, not a percent of your plan.
- Codex limits are only as fresh as the last Codex session that wrote them.
Support
Zovo extensions have no ads and no tracking, and sponsors pay for the time that goes into fixes and new viewers. You can sponsor the work on GitHub Sponsors.
More viewers by Zovo
- Claude Code History & Codex History Viewer browses and searches your local Claude Code and Codex sessions.
- Agent Skills & Claude Skills (Skill Shelf) lists, checks and toggles the Agent Skills that Claude Code, Codex and Cursor load.
- AGENTS.md & CLAUDE.md Linter (Context Drift) finds stale commands, paths and versions in AGENTS.md and CLAUDE.md files.
- Large JSON Viewer & JSON Tree shows large JSON files as a searchable tree, copies JSONPath and turns arrays of objects into a table.
- JSONL Viewer & NDJSON Viewer (JSONL Table) opens JSONL and NDJSON files as a table, as records or as a chat view.
- PDF Viewer & PDF Reader with Dark Mode reads PDFs with a real dark mode, search, an outline and thumbnails.
- CSV Viewer, Excel Viewer (XLSX) & Parquet Viewer opens CSV, TSV, Excel and Parquet files as a sortable, filterable table.
- DOCX Viewer & Word Viewer with Dark Mode previews Word and ODT files with dark mode, an outline and search.
- PPTX Viewer & PowerPoint Viewer shows PowerPoint slides, thumbnails and speaker notes.
- SQLite Viewer & DB Viewer (Read-Only) browses SQLite tables read-only and runs SELECT queries.
- HDF5 & NetCDF Explorer (H5 Viewer) browses groups, attributes and values in HDF5 and NetCDF files and plots slices.
- GGUF, Safetensors & NPY Viewer (NumPy Viewer) shows NPY, NPZ, Safetensors and GGUF tensors with stats and heatmaps.
- MP4 Video Player & Video Preview with Sound plays MP4, MOV, MKV and WebM files with their sound.
- DXF Viewer & CAD Viewer for 2D Drawings opens ASCII and binary DXF drawings with layers, measuring and PNG or SVG export.
Coming soon to the Marketplace, with the code on GitHub now.
- Audio Preview & Loudness Meter plays audio files with a waveform, a spectrogram and LUFS loudness.
- Graphviz Preview & DOT Viewer shows a live preview of DOT files and exports SVG or PNG.
- TIFF Viewer (16-bit, Float, GeoTIFF) opens 16-bit, float, multi-page and GeoTIFF images.
- Avro Viewer, Arrow Viewer & Feather Viewer opens Avro, Arrow and Feather files as a paged table.
- EML Viewer & MBOX Email Viewer reads EML, EMLX and MBOX email files with remote images blocked.
- 3D Model Viewer (GLB, glTF, STL, OBJ, PLY) views GLB, glTF, STL, OBJ, PLY and 3MF models.
- PKL Viewer & Pickle Viewer opens Python pickle files without Python and never runs their code.
- DICOM Viewer & NIfTI Viewer for CT and MRI opens CT and MRI scans, DICOM folders and NIfTI volumes with window presets and three views.
- ZIP Viewer & Archive Explorer (JAR, TAR, GZ) browses ZIP, JAR, VSIX, TAR and GZ files, opens entries in tabs and extracts them safely.
- GCode Viewer & 3D Print Preview shows GCode toolpaths in 3D layer by layer, with print time and filament use.
- EPUB Reader & EPUB Viewer reads EPUB books with a table of contents, search and light, sepia or dark themes.
- HAR Viewer & HTTP Archive Viewer opens HAR files from browser DevTools with a timing waterfall, filters and a redacted copy for sharing.
- Font Viewer & Font Preview (TTF, OTF, WOFF) opens TTF, OTF, WOFF, WOFF2 and TTC fonts with a glyph grid, a type tester with variable axes and the license fields.
- File Viewers Pack installs the PDF, table, Word, PowerPoint, HDF5 and tensor viewers in one step.
| |