Stretch your Claude Code plan
limitcast is a command-line tool that shows what fills your context, warns you before a usage window runs out, and stops new subagents that would use up the rest of it. Then it shows you what that saved. It reads data already on your machine. No logins.
$ limitcast trim
Every Claude Code session starts at 102.7k tokens before your first message.
## Measured savings: ~6.2k tokens per session (6% of your starting context)
- Disable 9 MCP servers you haven't used in 14 days (~0.9k): postman, context7, ...
- Hide 66 skills from the model (~5.3k): dataviz, block-kit, ...
Where your plan goes
Claude Code and Codex plans meter usage in rolling windows, such as a 5-hour window and a weekly one. Two things use them up faster than most people notice.
Starting context
Every session loads about 100k tokens before you type: hook output, MCP server instructions and tool lists, skill listings, agent lists and CLAUDE.md files. That block is sent again on every turn and to every subagent.
Subagents
Each subagent starts with its own copy of that context. A few parallel subagents late in a window can use up the rest of it, and you find out when you're locked out.
What limitcast does
Each feature shows the exact text limitcast prints. The numbers are an example; yours come from your own readings and transcripts.
Runout forecast
Free limitcast status- For each limit window: percent used, burn rate, the clock time it runs out, and when it resets.
- Claude Code passes its own limit readings to your status line; limitcast records them as they change. Codex is read from its session logs with no setup.
- The burn rate is a straight-line fit over the last hour of the window. AT_RISK means you'll hit 100% before the reset; NEAR means 95% or more is used, even before there's a burn rate.
- The weekly window is paced over the last full day, nights and idle time included, so one busy hour on Monday doesn't predict a runout by Wednesday. A burst that would use up the week within the next hour still triggers the warning and the guard.
- Sessions of the same account share one history, so a short session still gets a forecast. Two accounts used in parallel never mix.
-
Daily allowance:
for the weekly window, today's even share of what was left this morning,
and how much of it today used:
7d 41% · today 6% leftin the status line, atodaycolumn instatus.
$ limitcast status window used burn runs out resets today status claude 5h 71% +18.2%/h 16:40 17:00 - AT_RISK claude 7d 41% +0.6%/h - Sun 03:00 6% left OK codex 5h 22% +4.1%/h - 18:12 - OK # in the status line: 5h 71% ⚠ out 16:40 · 7d 41% · today 6% left
Benefit: you see the lockout coming while there's still time to slow down, switch tools, or move heavy work past the reset.
Trim advisor
Free totals Pro names and cuts limitcast trim [--days N] [--share] [--apply]- Reads your latest session's transcript and counts the tokens each startup item actually loaded: SessionStart hook output, each MCP server's instructions and tool names, each skill, the agent list, and instruction files.
- Compares that with what you used over the last N days (default 7): skill calls, slash commands and MCP tool calls.
- Free shows your starting-context total and how much of it you haven't used.
- Pro names each server, skill and hook to cut and what it costs.
-
--apply(Pro) makes the cuts through Claude Code's own settings: unused skills are hidden from the model (/namestill works) and unused MCP servers are turned off for that project. Both files are backed up, and--undoreverses exactly what changed. Plugin skills, and servers whose exact name it can't confirm, are listed for/pluginand/mcp. If Claude Code later writes over those settings, the cuts are put back at the next session start; anything you turn back on yourself stays on. -
--shareprints totals with no project, file, skill, server or hook names, so it's safe to post. -
--codexdoes the same for Codex: the AGENTS.md text it loads every session, and the MCP servers in~/.codex/config.tomlyou haven't used. With Pro,--applyturns them off (enabled = false) and--undorestores the file exactly.
$ limitcast trim --apply ✓ Hid 66 skills from the model (`/name` still works): dataviz, block-kit, … ✓ Turned off 9 MCP servers for ~/work/api: postman, context7, … Takes effect in your next Claude Code session. Undo: `limitcast trim --undo` $ limitcast trim --codex --apply ✓ Turned off 3 Codex MCP servers (enabled = false in ~/.codex/config.toml): firecrawl, icm, node_repl
Benefit: every token you cut is saved on every turn of every session and every subagent. The numbers come from your own transcripts, not estimates.
Subagent guard
Free preview Pro blocks limitcast install --guard-
A hook that runs before Claude Code starts a
TaskorAgentsubagent, or Codex starts aspawn_agent. -
Blocks the spawn only when that tool's own window is on pace to run out
within 30 minutes and before it resets. The margin is set by
LIMITCAST_GUARD_MINUTES. - While a Claude window is tight (NEAR or AT_RISK) but not about to run out, a new subagent that would run on your main model (or Opus) runs on Sonnet instead. An explicit Sonnet or Haiku is left alone.
-
Free
installs run it as a preview: it never acts, and
limitcast resultsshows what it would have stopped or switched, and whether those windows then ran out. When there's something to show, the status line says so once a week. -
Built to stay out of your way: if it errors, it allows the call; a
window already at 100% is left alone so paid extra usage keeps working;
LIMITCAST_ALLOW=1overrides it. - In Codex it is added after your existing hooks, so the ones you've already approved keep their approval.
# a new subagent, 21 minutes before the window runs out: limitcast: Claude 5h limit is 93% used and on pace to run out in ~21 min, before it resets. Finish with the agents already running, or set LIMITCAST_ALLOW=1 to spawn anyway. # a new subagent while the window is tight: limitcast: Claude 5h limit is 88% used; this subagent runs on Sonnet. Set LIMITCAST_ALLOW=1 to keep the main model.
Benefit: stops the most common way people lose the end of a window: a burst of subagents started when the window is nearly gone.
Subagent receipts and budgets
Pro limitcast budget subagents <percent>|off- New in 0.11. When a subagent finishes, a SubagentStop hook prices it from its own transcript against your 5-hour window, using your own calibration, and shows you the receipt. The model never sees it.
-
limitcast budget subagents 15makes the guard hold new subagents once subagents have used 15% of the current 5-hour window, until it resets.offremoves it;limitcast budget subagentsshows what's used so far. -
Pricing needs about a day of your own readings first; until then
nothing counts against the budget.
limitcast resultstotals your subagents and names the biggest.
limitcast: that Explore subagent used ≈2.1% of your 5-hour window (34 calls, 180k new tokens). $ limitcast budget subagents 15 Subagent budget: 15% of each 5-hour window. Used this window so far: ≈6.4%. Once it's spent, the guard holds new subagents until the window resets.
Benefit: you see which subagents are expensive while you're still working, and a cap keeps one busy hour of agents from eating the whole window.
Cold-cache warning
Free preview Pro limitcast install --guard- New in 0.11. After a long pause the prompt cache has expired, and your next message re-sends the whole context as new tokens, which count far more against your limit than cached ones.
-
When a session that re-sends 100k+ tokens has been idle longer than the
cache lives (60 minutes; set
LIMITCAST_CACHE_MINUTES), a UserPromptSubmit hook holds that first message once and says what it will cost. Send it again and it goes through, or run/compactfirst. -
Never holds messages from background agents,
/compactor/clear. If the hook fails, the message goes through. Free installs record what it would have held.
limitcast: this session sat idle for 75 minutes, so its prompt cache has expired. Your message re-sends 300k tokens of context: ≈1.8% of your 5-hour window (≈0.03% if the cache were still warm). Send it again to go ahead, or run /compact first to shrink it.
Benefit: a "continue" after lunch no longer quietly costs a slice of your window; you decide whether to compact first.
Burn report
Pro limitcast report [--days N] [--out FILE]- Tokens by tool (Claude Code, Codex, Grok), day, project, model and session.
- The share of tokens that went to subagents.
- Read from each tool's own local logs, including Grok's per-turn usage records.
$ limitcast report --days 7 | tool | tokens | output | cache reads | share | | claude | 863.6M | 2.9M | 840.8M | 99% | | codex | 12.9M | 44.1k | 12.6M | 1% | Subagents used 21% of Claude tokens.
Benefit: shows which projects, models or habits use up your plan, across all three tools in one report.
Starting-context alerts
Pro limitcast install --alerts- At the start of each session, tells you when your starting context grew by about 1k tokens or more, and names what grew.
- The message is shown to you only, never to the model. It runs in about 0.3 seconds.
- Once a week, one line on what limitcast did: limits reached, how far ahead it warned, subagents stopped, tokens not re-sent.
limitcast: your Claude Code starting context grew ~3.4k tokens since your last session (MCP server instructions: linear new~2.1k, Instruction files: ~/CLAUDE.md +~1.3k). Run `limitcast trim` for details. limitcast this week: 2 limits reached, warned ahead on 2 (avg 38 min), guard blocked 3 subagents, moved 5 to Sonnet, 1.9M tokens not re-sent. Details: limitcast results
Benefit: catches a new plugin, a growing CLAUDE.md or a chatty hook the day it appears, not weeks later.
Results
Free limitcast results [--days N] [--share]- Opens with what happened since limitcast started watching: tokens not re-sent (your smaller starting context times every model call, read from your transcripts), how many of the limits it watched you approach it warned you about and how far ahead, and the subagents the guard stopped.
- Then the last week in detail: every limit you hit, with the forecast replayed from only the readings it had at the time, and what happened to each window after the guard acted.
-
The totals outlast the 8 days of raw readings: a daily background update
keeps them current.
--shareprints totals only, safe to post. - Shows what a smaller starting context was worth against your 5-hour limit, calibrated from your own readings: how many new tokens, and how many cached ones, move your meter by 1%. Cached tokens count far less, which is why long sessions and subagents, not your CLAUDE.md, are what run you out.
$ limitcast results Since limitcast started watching - 2.9M tokens not re-sent. Your sessions now start smaller than the first one limitcast measured… Against your limit: ≈ 0.31% of a 5-hour window. From your own readings, 1% of it is about 167.0k new tokens or 11.2M cached ones… - Warned you before 1 of the 1 limits it watched you approach, on average 40 min ahead. Limits reached - Claude 7d: hit Sat, Oct 24, 20:51, warned 40 min ahead
Benefit: you can check that limitcast works, and see what it's worth, from your own data.
Acts for you
Pro notify · budget · after-reset · results --html-
limitcast notify onsends one desktop notification when a Claude window turns NEAR, AT_RISK or HIT, and when it resets after a HIT. On macOS they come from a tiny limitcast notifier app (no Dock icon), so "limitcast" has its own entry in System Settings → Notifications; allow it there, and pick Persistent to keep a warning on screen until you dismiss it. -
New in 0.11:
limitcast notify ntfy <topic>also sends every notification to your phone through ntfy (install the ntfy app and subscribe to the topic), andlimitcast notify webhook <url>to a Slack or Discord incoming webhook.offremoves either. They're sent in the background, so no hook waits on the network. - New in 0.11: every day limitcast re-measures how many tokens move your 5-hour meter by 1%. When that shifts by 15% or more against the weeks before, you get a notification that your limit itself changed.
-
limitcast after-reset -- <command>waits for the window to reset, then runs the command (add--detachto run it in the background). -
When the current Claude account is near its limit, the status line
points to your other account with the most room, and
statuslists every account limitcast has current readings for. -
Past ~150k tokens re-sent per model call, the status line suggests
/compact. If you use your own status line, Pro adds a second line only when there's something to act on. -
limitcast results --htmlputs results, your current windows and the burn report on one page.
# desktop notification (and your phone or Slack, if you set one): limitcast — Claude 5h limit is on pace to run out at 16:40, before it resets at 17:00. limitcast — Your Claude limit looks smaller: 1% of the 5-hour window now takes ~139k new tokens, down from ~167k. # status line, when you need it: limitcast: ⇄ other account 5h 12% · 7d 30% · ctx 162k · /compact $ limitcast after-reset --detach -- claude -p "run the full test suite" Will run at 17:00 (after the claude 5h reset), in the background.
Benefit: you hear about a limit before you hit it, and the heavy work waits for the reset instead of you.
Setup and upkeep
Free install · uninstall · doctor [--fix] · trial-
installbacks up~/.claude/settings.jsonand keeps your status line looking exactly the same while it records readings. Running it twice is safe. It then shows your starting context right away. uninstallrestores your original settings exactly.-
doctorchecks setup, data freshness and the license, and tells you plainly if Claude Code, Codex or Grok changed the log format limitcast reads. It also runs once a day in the background: a problem shows⚠ run limitcast doctorin the status line. -
Hooks go through a small launcher that survives Node upgrades: if the
Node it used is gone, it finds
limitcaston your PATH, and if that's gone too, your status line still shows and every hook allows.doctor --fixre-installs with the current Node. -
Already installed with
--guardbefore 0.11? Runlimitcast doctor --fixto add the subagent receipts and the cold-cache warning. -
limitcast trialturns on Pro for 7 days on this computer, with no card, once. -
The Claude Code plugin adds
/limitcast:status,/limitcast:resultsand/limitcast:triminside a session.
$ limitcast doctor ✓ Status-line recorder installed ✓ Hook launcher points at this Node and limitcast ✓ Claude Code subagent guard installed ✓ Codex subagent guard installed and trusted ✓ Last Claude reading 0 min ago
Privacy
- Your usage data stays on your machine. Everything is read from files that already exist there.
- The free version makes no network calls.
- A Pro license talks to Polar, the payment and licensing service, only to activate, for a weekly background check, and to deactivate. Each call sends the license key and your computer's name.
- Phone and webhook notifications (Pro) are off until you turn them on. Then each notification's text goes to the service you chose, ntfy.sh or your webhook, and nothing else does.
- Hooks never wait on the network.
Free and Pro
| Free | Pro | |
|---|---|---|
| Price | $0 | $79/year or $9/month, 14 days free. Team: $69/seat/year, 3 seats minimum |
| Runout forecast with NEAR warnings and the daily allowance | ✓ | ✓ |
| Starting-context total and how much you never use (Claude Code and Codex) | ✓ | ✓ |
| Results: value since install, limits warned about | ✓ | ✓ |
| Subagent guard | Preview | Blocks, switches to Sonnet |
Names each item to cut, and cuts it (trim --apply)
|
✓ | |
| Burn report, alerts, weekly summary | ✓ | |
| Subagent receipts and a subagent budget per window | ✓ | |
| Cold-cache warning | Preview | ✓ |
| Notifications (desktop, phone, Slack or Discord), limit-change alerts, after-reset jobs, account pointer, dashboard | ✓ |
-
One key works on 3 computers.
limitcast deactivatefrees a slot so you can move it. - The key keeps working for up to 30 days offline.
-
14-day free trial on every plan: you're charged only if you keep Pro past
day 14. Cancel anytime in Polar's customer portal. Or try it first with
limitcast trial: 7 days, no card. - Team: each person gets their own key.
- 14-day refund on any charge: email support@limitcast.dev from your purchase address.
What happens when you buy
- Start the trial. Pick yearly or monthly; Polar handles checkout. Nothing is charged for 14 days.
- Get your key. It's in Polar's customer portal, linked from your confirmation email, and starts with
LIMITCAST-. - Turn on Pro, in one minute.
limitcast activate <key>, thenlimitcast install --guard --alertsandlimitcast notify on. Restart Claude Code. - Check it in a week.
limitcast resultsshows what it warned you about, stopped and saved. Not worth it? Cancel in the portal before day 14 and pay nothing.
What works with which tool
| Claude Code | Codex | Grok | |
|---|---|---|---|
| Runout forecast | ✓ | ✓ | No limit data on disk |
| Subagent guard | ✓ | ✓ | Never blocks |
| Burn report | ✓ | ✓ | ✓ |
| Results | ✓ | ✓ | - |
| Trim advisor | ✓ | - | - |
Get started
npm install -g limitcast # or: brew trust samstull9007/limitcast && brew install samstull9007/limitcast/limitcast
limitcast install # free: status-line recorder
limitcast trial # Pro free for 7 days, no card
limitcast activate <key> # Pro
limitcast install --guard # the subagent guard (free: preview only)
limitcast doctor
limitcast results # what limitcast did for you
Requires Node 20 or later on macOS or Linux. Homebrew 7 and later asks you to
trust a third-party tap before installing from it, hence the
brew trust. Restart Claude Code after installing. To add the slash commands, run
claude plugin install limitcast --marketplace SamStull9007/limitcast
in a terminal, or inside Claude Code
/plugin marketplace add SamStull9007/limitcast, then
/plugin install limitcast@limitcast.