Free calculator

How much is repeated compaction actually costing your sessions?

Pick your model, how many turns the session runs, and whether the cache is warm or cold - see how many times auto-compact would fire, and what each one costs in reprocessed tokens and a written summary.

Model

Sonnet 5 always runs the full 1M-token window, on every plan including Pro - which is why long sessions on it rarely reach auto-compact at all.

Cache state when compaction fires
Turns in this session40
1compaction expected across 40 turns
$0.386total compaction overhead (warm cache)
First compaction~turn 31
Reprocessed as cache reads~979.6K tok

vs $0 if you'd run /clear that many times instead - though each /clear throws away the conversation outright rather than keeping a summary of it. Which one is actually worth it depends on whether you need that continuity; the full trade-off is in /compact vs /clear.

The ~2% summary-size figure is modeled from Anthropic's own compaction docs, not a guaranteed ratio, and the cache-read reread rate assumes you're still inside the cache TTL (about an hour on a subscription), per cache and compaction, explained.

This is a modeled estimate, not your real session. Run the free scan to see how often your own sessions actually compact.

npx usagecutRun a free scan
Recommended next step

A clean setup is just the beginning.

UsageCut trims that for free. Want Claude Code to be genuinely better, not just leaner? ClockedCode is the curated, conflict-free setup - installed in one paste.

Upgrade your Claude Code
  • 10x your Claude Code with hand-picked tools
  • Specialist agents on your team
  • Stop spending hours researching plugins
How this estimate works

A count and a cost, not just a warning

Compaction isn't free just because it's automatic. Each time it fires, Claude Code sends a real request that rereads your entire history and writes a summary to replace it - the same mechanics broken down in cache and compaction, explained. This tool turns a session length into a count of how many times that would happen and totals what each one costs, instead of leaving it as a vague warning that context filled up.

The biggest lever in that cost is whether the cache is still warm when compaction fires. Reread the same history within Claude Code's cache TTL and it's billed at the cheap cache-read rate; come back after a break and the same reread bills as fresh input, 5-10x pricier per token depending on the model - the exact trade-off /compact vs /clear already works through for a single compaction. For how close your own session is to hitting that point in the first place, see the context window calculator or run the free scan below for your real number.

Free tools

More free tools for Claude Code

Small, focused, no-signup tools from the maker of ClockedCode. Free to use, forever.

UsageCutScan your real Claude Code setup and see exactly where your tokens are wasted, then cut it losslessly.Claude Code Cost CalculatorEstimate your monthly Claude Code cost from sessions per day and workload, and see whether Pro, Max, or API pricing wins.CLAUDE.md Token CounterPaste your CLAUDE.md or AGENTS.md to count its tokens and see which sections look conditional enough to move out.MCP Server Token Cost CheckerPaste your mcpServers config to see the estimated token cost per server, worst first, with tool-search deferred loading on or off.CLAUDE.md GeneratorAnswer a few questions about your stack and get a CLAUDE.md scoped to just that, with a live token cost per section.Context Window CalculatorSee what percent of your context window is used, your headroom before compaction, and the cache-read cost of carrying it.Usage Limit CalculatorProject your Claude Code usage-limit headroom across Pro, Max 5x, and Max 20x from your own baseline and Anthropic's confirmed usage multiplier.Subagent Cost CalculatorSee whether spawning N Claude Code subagents actually saves tokens versus doing the same work in one session, using the measured 216-token subagent overhead.Token Usage AnalyzerPaste lines from a Claude Code session transcript to see the token breakdown by cause: conversation text vs tool output, tool output by Read/Bash/agent calls, and duplicate file reads.Best MCP Servers for Claude CodeBrowse popular Claude Code MCP servers by category and see each one's estimated token cost per session, sorted worst to best.Hook Token Cost CalculatorPaste your hooks config to see the estimated token cost per hook, worst first, classified by how often each event actually fires.Tool Search Token Savings CalculatorPaste your mcpServers config to see how many tokens Claude Code's tool search saves by deferring schemas, and whether a custom auto:N threshold would load them upfront instead.Opus vs Sonnet Cost CalculatorSee the dollar gap between running Claude Code on Opus vs Sonnet, plus the honest (not naive) savings from pinning just the Sonnet-safe turns.Claude Code Model PickerAnswer 5 questions about your current task to get a straight verdict: stay on Opus, hand it to a Sonnet subagent, or use opusplan.Which Claude Plan Should You UseAnswer a few questions about your usage and team size to get a straight Pro, Max, Team, or Enterprise recommendation with real current pricing.

More free Claude Code tools are on the way - built one at a time by a solo dev who ships daily.

Built for developers using Claude Code every day - by a solo dev who ships daily and uses this on his own setup.

Open-source scanner, runs locally, your code never leaves your machine.

Claude Code tips, every Sunday

One short email a week: the token-saving tricks, setup tweaks, and tools worth your time. Free, unsubscribe anytime.

Compaction cost FAQ

About this estimate

Where does the ~2% summary-size figure come from?

Anthropic's own compaction documentation, whose worked usage example shows a compaction step reprocessing 180,000 input tokens to produce a 3,500-token summary - about 1.94% of what it read. That's a single documented example, not a ratio Anthropic guarantees, so treat it as a modeled estimate: a real summary can run shorter or longer depending on how much detail the conversation asked to keep.

Why does the cache-warm vs cache-cold toggle move the cost so much?

Because a compaction request rereads your entire history before it can write a summary, and where that reread lands - cache-read rate or full input rate - depends on Claude Code's cache TTL: about an hour on a subscription, five minutes by default on an API key. Inside that window a compaction reads cheap; past it, the same reread bills as fresh input, which is 5-10x pricier per token depending on the model. See /compact vs /clear for the full breakdown.

Is this modeling Claude Code's own auto-compact, or the raw API's compaction feature?

Claude Code's own compaction, the same mechanism whether it fires automatically or you run /compact yourself: reread the history, write a summary, replace everything before it. Anthropic's compaction docs describe the same reread-then-summarize shape at the API level, which is what this tool's summary-size figure is sourced from.

Why does Sonnet 5 show 0 compactions until a really long session?

Sonnet 5 always runs the full 1M-token window, on every plan including Pro, so its modeled auto-compact point sits around 967,000 tokens - roughly 30 turns away at this site's measured per-turn average. Opus on Pro's 200K standard window and Haiku 4.5 hit their auto-compact point far sooner, which is why switching the model or context window toggle changes the compaction count so much.

FAQ

Questions, answered

Is UsageCut really free?

Yes. The scan and every fix are free - no card, no subscription, no signup. You only give an email if you want the optimization plan and one-command undo sent to your inbox.

Is my code safe? Does UsageCut upload anything?

The scan runs entirely on your machine. It never uploads your code, never reads your API key, and never sends your prompts or conversations anywhere. Only anonymous summary counts leave, and only if you choose to share them.

How does it reduce Claude Code token usage?

It reads your local setup and session history to find waste - idle MCP servers loaded into every session, an oversized CLAUDE.md re-sent on every request, duplicate file reads, and bloated tool output - then trims it losslessly, so each session carries less context and you hit your limit far less often.

What is ClockedCode?

ClockedCode is the curated, conflict-free Claude Code setup from the same maker. UsageCut makes your current setup leaner; ClockedCode makes it genuinely better - a set of hand-picked tools, specialist agents, and a tuned CLAUDE.md, installed in one paste.

Who is ClockedCode for?

Developers who use Claude Code daily and want a setup that is powerful out of the box instead of spending hours researching and wiring up plugins, agents, and MCP servers themselves.

What's included in ClockedCode?

A vetted, conflict-free bundle of hand-picked tools, specialist agents, and a tuned CLAUDE.md - everything installed together in one paste, with no setup archaeology.

Is ClockedCode a one-time payment?

Yes. ClockedCode is a one-time purchase with an instant download - no subscription and no recurring fees.

Does ClockedCode work with my existing setup?

Yes. It installs alongside what you already have and is fully reversible. Run UsageCut first to clean your current setup, then add ClockedCode to level it up.