Anthropic
Track Claude Code usage limits locally
Claude Code on a Pro or Max plan has a current session limit and a weekly limit across all models, each with its own reset time. Max accounts also get a separate weekly Fable allowance. Extra usage is a dollar budget, not a limit window. Agent Tank shows how much of each limit you have used and when it resets, on a local dashboard and JSON API.
npm install -g agent-tank
agent-tank --claude
New to Agent Tank? Read Getting started
How Claude limits work
Claude Code on a Pro or Max plan has a current session limit and a weekly limit across all models, each with its own reset time. Max accounts also get a separate weekly Fable allowance. Extra usage is a dollar budget, not a limit window.
Agent Tank reports each limit as a window with a type (session, five_hour or weekly), the percentage used and remaining, and the reset time in ISO 8601, so Claude looks the same in the API as every other provider. For how the windows reset and what happens at a limit, read How five-hour and weekly usage windows work (Claude, Codex, Antigravity) and Claude plans compared: what the usage limits mean and Claude subscription vs paying for the API and Claude vs Codex vs Antigravity: what each is good at and how their limits compare and How to avoid running out of limits mid-task and How to check your Claude Code usage and remaining limits and Is Claude Max worth it for heavy Claude Code use? and What happens when you hit the Claude weekly limit and Show coding agent usage in tmux, Waybar or SwiftBar and Track work and personal accounts together and How fast am I using my Claude Code limit? Pace and burn rate and Claude Code /usage vs /status and Read coding agent usage from a script or VS Code task and Claude usage credits explained and The Claude Fable weekly limit on Max.
For plan details, see Anthropic’s Claude Code documentation.
What Agent Tank tracks
| Window | Type | Model | Notes |
|---|---|---|---|
| Current session | session |
— | — |
| Current week (all models) | weekly |
— | — |
| Current week (Fable) | weekly |
Fable | Max accounts only |
| Plan | Claude's /status login method, lowercased ("max"). If Claude doesn't report a plan, it falls back to "max" when a weekly Fable window is present, and null otherwise. | ||
| Context window | Looked up from the model Claude reports on /status (e.g. claude-opus-5-5) in Agent Tank's built-in table, reported with source "known-model", or set with the contextWindows config key (source "override"). | ||
| Credits | Always null. Claude's extra usage is a dollar budget, not credits, and stays under raw.usage.extraUsage. | ||
How it reads the data
Runs /usage in the local Claude Code CLI, or reads the Anthropic OAuth usage API with --claude-api. Everything happens on your machine, through the claude CLI you are already signed in to.
- By default, Claude usage is collected via PTY by running /usage.
- With --claude-api, Agent Tank reads the same Claude OAuth credentials the CLI already uses and calls https://api.anthropic.com/api/oauth/usage. This is usually faster and supports a shorter refresh interval.
- Expired OAuth tokens are refreshed when needed, and Agent Tank falls back to PTY mode if the API path fails.
- In the default activity refresh mode, Agent Tank watches
~/.config/claude/projects/and~/.claude/and refreshes after you use the CLI.
Agent Tank never:
- scrape provider websites
- read browser cookies
- depend on a logged-in browser session
- MITM or inspect your network traffic
- send your usage data to a remote service
In the dashboard
Sample API output
Every account has its own endpoint. This is the claude account:
curl -s http://127.0.0.1:3456/status/claude | jq
{
"id": "claude",
"provider": "claude",
"plan": "max",
"status": "ok",
"last_updated": "2026-10-17T12:00:00.000Z",
"error": null,
"windows": [
{
"type": "session",
"label": "Current session",
"model": null,
"used_percent": 25,
"remaining_percent": 75,
"resets_at": "2026-10-17T14:00:00.000Z",
"resets_in_seconds": 7200,
"pace": {
"ratio": 0.42,
"burning_fast": false
}
},
{
"type": "weekly",
"label": "Current week (all models)",
"model": null,
"used_percent": 28,
"remaining_percent": 72,
"resets_at": "2026-10-22T09:00:00.000Z",
"resets_in_seconds": 421200,
"pace": {
"ratio": 0.92,
"burning_fast": false
}
},
{
"type": "weekly",
"label": "Current week (Fable)",
"model": "Fable",
"used_percent": 15,
"remaining_percent": 85,
"resets_at": "2026-10-22T09:00:00.000Z",
"resets_in_seconds": 421200,
"pace": {
"ratio": 0.49,
"burning_fast": false
}
}
],
"context_window": {
"total_tokens": 1000000,
"used_tokens": null,
"used_percent": null,
"remaining_percent": null,
"model": "claude-opus-5-5",
"source": "known-model"
},
"credits": null,
"raw": {
"…": "original per-provider payload"
}
}
raw, the untouched Claude payload, is abbreviated here. The sample is synthetic, generated by Agent Tank 0.10.0’s own normalizer.
List each window’s usage and reset time:
curl -s http://127.0.0.1:3456/status/claude | jq '.windows[] | {label, used_percent, resets_at}'
Install and run
Install Agent Tank (Node.js 18+) and start it with Claude only:
npm install -g agent-tank
agent-tank --claude
It needs the Claude Code CLI installed, signed in and on your PATH as claude (Version 2.0+ required for /usage). Agent Tank 0.10.0 was verified with version 2.1.302. Check yours with:
claude --version
Multiple accounts
Add one --agent per account as claude:<alias>=<path>. Each path is passed to claude as CLAUDE_CONFIG_DIR, so every account keeps its own login, and the alias becomes its id in /status/<alias>:
agent-tank \
--agent claude:work=/srv/accounts/claude-work \
--agent claude:personal=/srv/accounts/claude-personal
See Accounts and providers for the config file equivalent, or Getting started for the full setup.
Notes
- Claude API mode can also be enabled with AGENT_TANK_CLAUDE_API=1 or "claudeApi": true in the config file. It is usually faster than /usage and supports a shorter refresh interval (60 seconds).
- The weekly Fable window has model "Fable"; the all-models windows have model null. Use model to tell apart windows that share a type.
- Claude's own reset times stay display strings under raw, such as "12:20am (Europe/Berlin)"; read the ISO 8601 resets_at instead.
Related
- OpenAI Codex usage limit tracker
- Antigravity CLI usage limit tracker
- API reference
- Configuring accounts
- Context window and credits
- How five-hour and weekly usage windows work (Claude, Codex, Antigravity)
- Claude plans compared: what the usage limits mean
- Claude subscription vs paying for the API
- Claude vs Codex vs Antigravity: what each is good at and how their limits compare
- How to avoid running out of limits mid-task
- How to check your Claude Code usage and remaining limits
- Is Claude Max worth it for heavy Claude Code use?
- What happens when you hit the Claude weekly limit
- Show coding agent usage in tmux, Waybar or SwiftBar
- Track work and personal accounts together
- How fast am I using my Claude Code limit? Pace and burn rate
- Claude Code /usage vs /status
- Read coding agent usage from a script or VS Code task
- Claude usage credits explained
- The Claude Fable weekly limit on Max