Usage Limits Monitor
Usage Limits Monitor shows Claude Code and Codex usage limits in a simple VS Code side panel.
Features
- Claude Code 5-hour and weekly usage windows.
- Claude Code extra usage credits when available.
- Claude Code daily token usage from local transcript usage metadata, excluding cache/context rereads.
- Codex 5-hour and weekly usage windows.
- Codex token usage for today when returned by Codex.
- Automatic refresh every 60 seconds and refresh on detectable local usage-file changes.
How it works
By default, the extension uses real usage sources when available:
- Codex: reads usage limits from the official Codex app-server method
account/rateLimits/read.
- Claude Code: reads the local Claude Code OAuth credentials from
~/.claude/.credentials.json and requests usage limits from Anthropic's Claude usage endpoint. This also works when Claude Code is used only from the VS Code extension. Today's Claude token usage is aggregated locally from Claude Code transcript usage metadata, using input and output tokens only.
The Claude statusLine collector is still available as a fallback for users who run Claude Code in a terminal TUI.
You can also configure custom commands that print usage or limit information:
usageLimitsMonitor.codexCommand
usageLimitsMonitor.claudeCommand
If a custom command prints JSON, the panel will show common fields such as used, limit, remaining, resetAt, plan, and status. Otherwise, the raw output is shown in a readable block.
The panel refreshes automatically every 60 seconds by default. It also watches local Claude/Codex usage files and refreshes shortly after they change when the platform exposes a detectable file update.
Settings
usageLimitsMonitor.refreshIntervalSeconds: automatic refresh interval. Set to 0 to disable timer-based refresh.
usageLimitsMonitor.codexCommand: optional custom command for Codex usage data.
usageLimitsMonitor.claudeCommand: optional custom command for Claude Code usage data.
Privacy
Usage Limits Monitor runs locally inside VS Code. Codex usage is read through the local Codex app-server.
For Claude Code, the extension reads the local Claude OAuth token and sends it only to Anthropic's usage endpoint. Tokens are not shown in the panel or stored by this extension. If the token is expired, the extension may refresh it and update ~/.claude/.credentials.json, matching Claude Code's local credential flow.
For Claude token totals, the extension scans local ~/.claude/projects/**/*.jsonl files and reads only timestamps, message ids, and usage token counters. Prompt and response text are not displayed. Cache read and cache creation counters are ignored for the daily token number because Claude Code can reuse cached context across turns.
The optional Claude collector writes only status-line usage fields to ~/.claude/usage-limits-monitor/latest-status.json.
On Windows, the collector command uses forward slashes in file paths because Claude Code may run status line commands through Git Bash.
Development
npm install
npm run compile
Open this folder in VS Code and press F5 to launch the Extension Development Host.
For Marketplace publishing steps, see PUBLISHING.md.