Claude Code Idle Compaction: What's Confirmed and What Isn't
What Claude Code idle compaction is, what the changelog confirms as of October 2026, how to read the post-compaction row, and fixes for Prompt is too long.

Idle compaction is a Claude Code feature name that started showing up in searches when v2.1.302 was published on GitHub on October 16, 2026. As of that date, the official changelog stops at 2.1.301, and the v2.1.302 release page shows no release notes. So there's no official text yet describing an Idle compaction row in /config, its default, or a settings key behind it. If your build shows that row, it's the on/off switch. If it doesn't, nothing in the published docs says you're missing anything.
What is documented is compaction itself: the /compact command, auto-compact, the compaction row that appears in the transcript afterward, and a batch of compaction fixes in 2.1.301. This page covers what the docs confirm, says plainly where they stop, and gives you the workarounds that exist today for the "Prompt is too long" error.
What compaction does in Claude Code#
Every turn in a Claude Code session resends the whole conversation to the model: your messages, Claude's replies, and every tool result in between. Tool results are the heavy part. One file read or one chatty test run can add thousands of tokens, and they ride along on every later request. The models overview lists a 1M-token context window for Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 as of October 16, 2026. That's large, but a long agentic session can still fill it.
Compaction is how Claude Code keeps the session under that limit. The older part of the transcript is summarized into a compact block, recent turns stay word for word, and the next request sends the summary plus those recent turns instead of the full history. Two triggers are documented in the Claude Code changelog:
- Manual: you run /compact and Claude Code summarizes right away.
- Automatic: auto-compact runs when the conversation gets too long for the model.
The same idea exists at the API level. The Claude Platform release notes for September 14, 2026 describe a Messages API compaction beta, under the compact-2026-09-04 beta header, where you choose when to compact, the request can run in the background, and recent turns can be kept verbatim after the summary. That's useful context for the word "idle": a summary doesn't have to be built at the exact moment a request is about to overflow.
Here's a toy version of the keep-recent-turns pattern so you can see what the model keeps and what it loses:
// Toy model of compaction: fold older turns into one summary block
// and keep the most recent turns word for word.
const turns = [];
for (let i = 1; i <= 12; i++) {
turns.push({ role: i % 2 ? "user" : "assistant", text: `turn ${i}, `.repeat(40) });
}
const KEEP = 4;
const chars = (list) => list.reduce((n, t) => n + t.text.length, 0);
const older = turns.slice(0, -KEEP);
const recent = turns.slice(-KEEP);
const summary = { role: "summary", text: `Summary of ${older.length} earlier turns.` };
const compacted = [summary, ...recent];
console.log(`before: ${turns.length} turns, ${chars(turns)} chars`);
console.log(`after: ${compacted.length} blocks, ${chars(compacted)} chars`);
console.log("kept verbatim:", recent.map((t) => t.text.slice(0, 7).trim()).join(" | "));
For a closer look at where the tokens go in a real session, see why Claude Code uses so many tokens.
What idle compaction means and what's confirmed so far#
Read literally, idle compaction is compaction that runs while the session is idle, meaning between turns while you're reading or typing, rather than at the start of a request that would otherwise overflow. The benefit would be that the summary is already done when you press Enter, so the next turn doesn't stall on it. That reading is mine. The published changelog doesn't describe the behavior yet, and I'd rather say so than guess at details.
Here's where the official record stands as of October 16, 2026:
| Item | Status | Where to look |
|---|---|---|
| v2.1.302 release | Published October 16, 2026 at 20:53 UTC; no notes shown on the page | GitHub release page |
| 2.1.301 | Latest version with written notes | CHANGELOG.md on GitHub |
| Idle compaction row in /config | Not described in the changelog yet | Your own /config menu |
| Fix for Prompt is too long when stopping mid-compaction | Not described in the changelog yet | The changelog after your next update |
The practical move is to update, open /config, and look. If the row is there, the next section applies. Either way, keep an eye on the changelog. That's where Anthropic writes the notes for each version, and it's where the setting's name, default and any settings.json key will be stated.
Turning idle compaction off or on from /config#
If your build has the Idle compaction row, the switch is in the interactive config menu:
- Type /config in the Claude Code prompt and press Enter.
- Move to the Idle compaction row.
- Toggle it, then leave the menu.
A few things I'd hold off on until the changelog documents them:
- Don't hand-edit a settings.json key for this. No key is published, and a guessed key does nothing at best. Where Claude Code settings.json lives covers the files that do exist if you want to check what's in yours.
- Don't assume turning it off disables compaction entirely. Auto-compact and /compact are separate, documented behaviors. A session that fills its window still has to be summarized before the next request can go out.
- Don't assume a default. Leave the row in whatever state you find it unless you have a reason to change it.
Why would anyone turn it off? The only documented cost signal comes from model switching: 2.1.301 fixed a case where switching to a model with a smaller context window could spend usage credits on a summary without asking first. A summary is a model call, and model calls cost usage. If you're on a plan where every call counts against a limit, you might prefer compaction only when it's needed. When the usage limit resets explains what that limit looks like in practice.
Here's a rough feel for what one summary costs at API list prices, if the summary is produced by Claude Fable 5.1:
# Rough cost of one compaction summary at Claude Fable 5.1 list prices:
# $10 per million input tokens, $50 per million output tokens.
INPUT_PER_MTOK = 10.00
OUTPUT_PER_MTOK = 50.00
def summary_cost(context_tokens, summary_tokens):
inp = context_tokens / 1_000_000 * INPUT_PER_MTOK
out = summary_tokens / 1_000_000 * OUTPUT_PER_MTOK
return inp + out
for ctx in (200_000, 500_000, 900_000):
print(f"{ctx:>9,} tokens summarized -> about ${summary_cost(ctx, 6_000):.2f}")
Those are the list prices on the pricing page as of October 16, 2026. Cache reads are cheaper than fresh input, so treat the output as the shape of the cost rather than a bill.
What the post-compaction notice means#
After a compaction, Claude Code inserts a compaction row into the transcript. In a live session it offers ctrl+o to open the earlier history that was summarized. In a session you resumed, the earlier messages aren't loaded, so 2.1.301 changed the row to say where those messages are saved instead of offering a shortcut that wouldn't work. The row now also shows in fullscreen mode.
What the row tells you in practice:
- From this point on, the model sees a summary of everything above the row, plus the turns below it word for word.
- Details that lived only in summarized messages may be gone from the model's working view. Exact error text, a long diff, a specific line number: if you need Claude to act on one of these, paste it again or point Claude at the file.
- Your scrollback is not the model's view. You can still read the earlier turns with ctrl+o or in the saved file, but Claude can't unless you bring the content back.
Two related 2.1.301 fixes are worth knowing about. In fullscreen mode, /compact and auto-compact no longer briefly freeze the UI while the visible transcript is rebuilt. And behind an LLM gateway whose responses name a different model than the one requested, conversations were being compacted over and over on a model you didn't pick. That's fixed too.
Prompt is too long after stopping a turn mid-compaction#
The error text means the request Claude Code tried to send was bigger than the model's context window. It's what you'd expect if a compaction never finished, because the next request goes out with the full, unsummarized history. Stopping a turn while a summary is in flight is one way to get there. As of October 16, 2026, the changelog up to 2.1.301 doesn't list a fix for this specific sequence, and the v2.1.302 notes aren't published, so I can't tell you which version resolves it. Here's what is documented and works today:
- Run /compact yourself and let it finish. Don't press Esc until the compaction row appears.
- If you're starting something unrelated anyway, use /clear. Claude Code hints "new task? /clear to save tokens" when it thinks you've moved on, and 2.1.301 fixed that hint reappearing right after you interrupt a response.
- If you switched to a model with a smaller window, 2.1.301 now summarizes a too-long conversation with the previous model first and asks before spending usage credits on it. Accept the summary rather than retrying the request as is.
- If you're behind an LLM gateway, update to 2.1.301 or later before debugging further. The repeated-compaction bug could look like a stuck session.
The slash commands cheat sheet lists /compact, /clear and /rewind together if you want the full set in one place.
Common mistakes and gotchas#
- Treating idle compaction and auto-compact as the same switch. They're different behaviors. The documented one, auto-compact, runs when the transcript is too long for the model. Turning off a /config row for idle compaction doesn't change that.
- Guessing a settings key. A key that isn't in the changelog isn't read by Claude Code. You'll think it's off and it won't be.
- Interrupting during a summary and then sending a big prompt. That's the sequence most likely to produce Prompt is too long. Wait for the compaction row first.
- Expecting ctrl+o in a resumed session. The earlier messages aren't loaded. The row tells you where they're saved instead.
- Assuming the summary is lossless. It isn't. Re-state anything precise the model needs after the row.
- Running behind a gateway that renames models. Before 2.1.301 that caused repeat compaction. Check the model name your gateway returns in its responses.
- Blaming compaction for missing skills after /rewind. Unrelated to context size: 2.1.301 fixed skills no longer being listed to the model after /rewind, so that one is a version issue.
Quick reference#
- Update first. v2.1.302 is on GitHub as of October 16, 2026, and 2.1.301 carries the documented compaction fixes.
- Open /config and look for an Idle compaction row. If it's there, toggle it there. Don't edit settings.json for it.
- /compact summarizes now. Auto-compact summarizes when the transcript is too long for the model.
- The compaction row marks where the model's verbatim view starts. ctrl+o opens earlier history in a live session; a resumed session shows the save location instead.
- Prompt is too long after an interrupted compaction: run /compact and let it finish, or /clear for a new task.
- Switching to a smaller-context model triggers a summary by the previous model and asks before spending credits.
- Watch the changelog for the 2.1.302 notes. That's where the setting's name, default and any key will be confirmed.
Quick answers
What is idle compaction in Claude Code?
Read literally, it's compaction that runs between turns while the session is idle, rather than when a request is about to overflow the context window. As of October 16, 2026 the changelog stops at 2.1.301 and doesn't describe it, so check /config in your build and re-read the changelog after updating.
How do I turn Claude Code idle compaction off or back on?
If your build shows an Idle compaction row in /config, toggle it there. Don't add a settings.json key for it, because none is documented and a guessed key won't be read.
Does turning off idle compaction stop all compaction?
No. /compact and auto-compact are separate, documented behaviors, and a transcript that's too long for the model still gets summarized before the next request.
Why do I get Prompt is too long after stopping a turn during compaction?
The next request went out with the full, unsummarized history and exceeded the model's context window. Run /compact and let it finish, or use /clear if you're starting a new task. The changelog up to 2.1.301 doesn't list a fix for this sequence yet.
Did this solve it?
One tap. No account.
Sorry about that. What was missing?
from 0 readers
Saved you an hour? Send a tip.
USDC or ETH on Base, Ethereum, Arbitrum and more. Keeps the notes free and the examples running.
Network
0xc783bc5c3fa14cEC3f09A22284bC91C5AF0d59e1
On a computer? Scan the code with your phone wallet, or copy the address.
Pick the network your wallet or exchange uses. USDC works on all six; ETH on Base, Ethereum, Arbitrum and Optimism. Don't send on Tron or Solana: this address doesn't exist there. Tips are optional and unlock nothing; every guide stays free.
Discussion
Start the discussion
Next note