Claude Code auto compact: what it does and why timing costs you
Auto compact is the built-in safety net that summarizes a long conversation. It is one of the biggest levers on re-read cost, and it is easy to get wrong.
Claude Code auto compact summarizes your conversation when it grows past a built-in point, so older history shrinks and later requests cost less. The catch is that summarizing a huge conversation is itself a large request, and defaults change between versions and models. QuotaPlug manages long sessions for you automatically, so you do not have to.
What Claude Code auto compact does
When a conversation grows large, Claude Code can replace older history with a summary. Your next requests carry the summary instead of the full transcript, so they are smaller and cheaper. Anthropic's docs describe it as a way to keep long sessions from getting more expensive with every step.
Why it matters: every step re-sends the context. In the founder's heaviest November 2026 week, 62% of spend was re-reading oversized conversations, and the biggest one had grown to nearly a million tokens. That is what an unmanaged long session looks like.
Why the defaults are a trade-off
Anthropic ships defaults that balance cost against continuity, and they are not the same for every model or every Claude Code version. They have changed this year, and the exact behavior depends on the model's context window, how the session was started and which settings are in play.
You can inspect your own session's behavior with /autocompact. But a default is a single answer for every kind of work, and your sessions are not all the same.
The hidden costs of leaving it alone
- The summary is itself a large request. It reads everything it summarizes, so it always has a cost.
- A safety net is not a plan. Until it fires, every step carries the whole history.
- Summaries lose detail. A compaction at the wrong moment can drop something you needed, and rebuilding it costs more.
- Heavy fixed context refills the space. If a lot is loaded into every request before you type anything, a conversation can need summarizing again soon after.
The right moment depends on the model, the task, and how much fixed context you carry. That is exactly the kind of judgment that is hard to make by hand, hundreds of times.
Auto compact, /compact or /clear: what is the difference?
| Auto compact | /compact | /clear | |
|---|---|---|---|
| Who triggers it | Claude Code, automatically | You, any time | You, any time |
| Keeps continuity | Yes, as a summary | Yes, with your focus text | No |
| Cost | One large request | One large request | $0 |
Common problems people run into
- "My setting is ignored." Several layers (environment, command, flag, managed settings) can disagree, and the winner is not obvious.
/autocompacttells you what your session uses. - "It compacts again right after compacting." Too much fixed context, and the window refills immediately.
- "It forgot a detail." Summaries lose things, and the loss is rarely visible until later.
- "The numbers on screen do not match when it ran." What the interface reports and when compaction actually happens are not the same measurement.
Why QuotaPlug handles this for you
You tune once, for one model, one project and one workflow. Then you switch models, open a heavier project, or Anthropic changes the default (it changed recently). A fixed setting cannot react to what is actually in your conversation.
QuotaPlug is a usage optimizer for Claude Code that makes a Claude Pro, Max or Ultra plan last 2 to 4 times longer. Same model, same effort level, same quality, and no changes to how you prompt. It installs in one command and runs locally.
It keeps long sessions from running up the bill, automatically, and you keep working the way you already do. Start with the audit to see how large your conversations actually got:
npx quotaplug auditLocal, no account needed. Nothing leaves your machine except daily counts. Plans from $4 a month. Compare with plain auto compact on auto compact vs QuotaPlug.
Frequently asked questions
What does auto compact do in Claude Code?
Can I see what my session uses?
/autocompact with no value to see your session's behavior.Does compacting cost tokens?
/clear costs nothing but starts fresh.Is /compact the same as /clear?
/compact keeps a summary so you can continue. /clear starts a fresh conversation with no history.