Originally published at its-tahir.com.
"Compacted using a summary written while you were away" is Claude Code's idle compaction notice: during your break, Claude Code summarised a long conversation of 200,000 tokens or more, and because you came back after its one-hour prompt cache had expired, your first message sent that summary instead of the whole history. To turn it off, add "idleCompaction": false to ~/.claude/settings.json (Claude Code 2.1.290 or later). That works in the terminal, VS Code and the desktop app; in a terminal on 2.1.302 or later you can instead switch the Idle compaction row off in /config. Your full transcript is still on disk under ~/.claude/projects/. It's a cost-saving feature, not a bug, and the conditions that trigger it, below, come from Anthropic's docs and Claude Code's own code.
Last reviewed 4 November 2026, against the 2.1.318 changelog and the notice strings in the 2.1.318 binary, which are unchanged from 2.1.314. New in this review: the 2.1.317 and 2.1.318 compaction fixes, including one for idle compaction replacing a conversation with a reply that wasn't a summary. Since the 31 October review: the notice text, so this page now covers both wordings; plus idle compaction in VS Code and the desktop app and why it sometimes never runs.
You left a long Claude Code session open over lunch. When you came back, this was waiting:
Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json
Or the line Anthropic's settings reference lists for terminal sessions, which means the same thing and has the same fix:
Compacted while idle, before the prompt cache expired
On 2.1.302 and later that line ends with the same turn-off tail.
You never ran /compact. You were nowhere near the context limit. But the exact instructions you'd given, the reasons behind decisions, and the approach you'd agreed on have been replaced by a summary.
You're not imagining it. Anthropic switched the feature on from its side around version 2.1.286, at first with no release note and no way to turn it off. The official note followed in 2.1.299 on October 14. The GitHub issue about it describes one user returning to find seven of their twenty open sessions compacted overnight.
Which idle compaction notice does Claude Code show?
Claude Code shows one of two idle compaction notices, with the same cause and the same fix. "Compacted using a summary written while you were away" means the summary was written during your break and used on your first message back, an hour or more after the last request. "Compacted while idle, before the prompt cache expired" means Claude Code compacted during the break, about 54 minutes in. From 2.1.302 both end with · turn off with "idleCompaction": false in settings.json. The wording follows the path, not your version: in the 2.1.314 binary the two strings sit next to each other with the same tail, and the "summary written while you were away" one is used only after an idle return.
| Notice | What happened | Where, and since when |
|---|---|---|
Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json |
Claude Code wrote the summary during your break and used it on your first message back, an hour or more after the last request | The notice in the VS Code chat panel and the desktop app's Code tab, official since 2.1.314; terminal sessions can show it too. The turn-off tail arrived in 2.1.302 |
Compacted after an hour idle, using a summary written while you were away |
The same path before the turn-off tail was added | Quoted from a 2.1.300 terminal install in issue #102260; replaced by the tailed wording in 2.1.302 |
Compacted while idle, before the prompt cache expired |
Claude Code compacted during the break, about 54 minutes in, before the one-hour cache expired | The line Anthropic's settings reference lists for terminal sessions, since the first rollout around 2.1.286; from 2.1.302 it ends with the same tail |
The 2.1.302 release note (16 October 2026) says the notices shown after an idle compaction "now say how to turn it off", which is that tail. If you see the older line, nothing is wrong with your install. Everything below applies to both.
What does "compacted using a summary written while you were away" mean?
"Compacted using a summary written while you were away", like the terminal's "Compacted while idle, before the prompt cache expired", means Claude Code summarised a long, idle conversation shortly before its one-hour prompt cache ran out and swapped the summary in when you came back, so your next message is billed for the summary instead of the full history. For how caching, context size and idle sessions add up to your overall usage, see why Claude Code uses so many tokens.
Every message you send carries your whole conversation with it. To keep that affordable, the API caches the conversation so it doesn't have to be reprocessed each turn. But the cache expires after a period of inactivity. Anthropic's caching docs explain that after a long enough gap, "the next request recomputes the full input and re-establishes the cache, which is why the first turn back after stepping away can be noticeably" slower.
On a Claude subscription, the main conversation gets a one-hour cache. So if you have a 300,000-token session and walk away for 61 minutes, your first message back pays to reprocess all 300,000 tokens — against your plan's usage limits.
Idle compaction gets ahead of that. Just before the prompt cache expires, the conversation is summarised — that's what "compacted while idle" means, and "a summary written while you were away" is the same idea with the summary applied when you return. When you come back, you're paying for the short summary, not the full history.
Idle compaction is a real saving, and people asked for it. A feature request from June wanted exactly this, and the community had already built add-ons to do it, such as claude-idle-compact. The complaint is that it arrived switched on, silently, for everyone.
How long does the Claude Code prompt cache last?
The Claude Code prompt cache lasts one hour for the main conversation on a Claude subscription, and five minutes by default on an API key or on Bedrock, Vertex or Foundry. When it expires, your next message re-sends and reprocesses the whole conversation at full input cost. Cache costs in more detail are in why Claude Code uses so many tokens.
- Claude subscription (Pro, Max): one hour for the main conversation, dropping to five minutes once you draw on usage credits. This is the case idle compaction is built for.
- API key, or a cloud provider such as Bedrock, Vertex or Foundry: five minutes by default. Idle compaction runs only on a one-hour cache; since Claude Code 2.1.314 that includes Bedrock, Vertex, Foundry and LLM gateways with the one-hour cache turned on.
After the cache expires, the first message back re-sends the whole conversation unless idle compaction has already shrunk it.
When does Claude Code's idle compaction run?
Claude Code's idle compaction runs when an interactive session on the one-hour prompt cache has at least 200,000 tokens of context, has sat idle for about 54 minutes (90% of the cache lifetime), and Anthropic's server-side switch is on. Anthropic's 2.1.299 release note sums it up in one line: "a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires." Anthropic's settings reference now lists the official conditions too. For the rest, I read the code that decides when it runs, first in 2.1.290 and again in 2.1.302. The 54-minute trigger hasn't changed. What the settings reference adds for VS Code and the desktop app is a second path: the summary is written while you're away and used only if your next message comes an hour or more after the last request, which is what the newer notice describes.
Idle compaction only fires when all of these are true:
| Condition | Detail |
|---|---|
| Anthropic has it switched on | A server-side flag sets it to off, log-only, or compact. Claude Code must be able to fetch feature flags from Anthropic, so it never runs where that's turned off |
| You're in an interactive session | The terminal, the VS Code chat panel or the desktop app's Code tab (when the session runs on your machine or over SSH); not in non-interactive runs |
| Auto-compact is on | Turning off autoCompactEnabled also stops idle compaction |
| You haven't opted out | The new idleCompaction setting isn't false
|
| The cache lasts one hour | It skips sessions on the five-minute cache |
| The context is 200,000 tokens or more | The default threshold — never lower than 100,000 |
| You've been away long enough | It fires 90% of the way to the cache expiring, so about 54 minutes |
| Your computer is awake | Per Anthropic's docs, it has to be awake at that point, so a sleeping laptop doesn't compact |
| Nothing else is happening | No turn running, no newer request, not near your rate limit, and the cache still warm |
Four things in that table answer the questions people ask most.
"Why does it only happen to some of my sessions?" The 200,000-token threshold. Short sessions are never touched. An Anthropic collaborator confirmed in the issue thread that it currently applies "only for larger contexts (200k+)". At the default threshold, the settings reference adds, a conversation on a 200K context window auto-compacts before it reaches 200,000 tokens, so idle compaction mostly affects sessions on the 1M context window unless you lower the threshold.
"Why don't I see it on my work API key?" The one-hour rule. On an API key or a cloud provider, the main conversation defaults to the five-minute cache, so idle compaction doesn't run unless you've set promptCacheTtl to 1h (and, for Bedrock, Vertex, Foundry and gateways, you're on 2.1.314 or later).
"It never happens on my laptop." Check whether it was asleep at the 54-minute mark, or whether feature-flag fetching is turned off, which stops idle compaction. Turning off telemetry also stopped it before 2.1.314; since 2.1.314 it runs for subscribers with telemetry off.
"I'm on 2.1.285 and still got it." The idle-compaction code and its server switch are already in 2.1.285 — I checked that package too. What changed around 2.1.286 was Anthropic switching it on. Downgrading isn't a reliable way out.
Idle compaction in VS Code and the desktop app
Officially since Claude Code 2.1.314 (I saw it on 2.1.310, below), idle compaction also runs in the VS Code extension's chat panel and the desktop app's Code tab, and the settings reference documents it. It works differently there: Claude Code writes the summary while you're away, then uses it only if your next message comes an hour or more after the last request. The notice is:
Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json
In the desktop app it sits inside a row labelled Claude Code notice. If you can't see it, switch to the Verbose view mode. Before 2.1.302 the same path showed Compacted after an hour idle, using a summary written while you were away, as quoted in issue #102260.
I've seen it in my own VS Code sessions. On 27 October, on 2.1.310, two compactions in the VS Code panel fired at 265,565 and 263,336 tokens, after breaks of about three and seven hours. Normal auto-compactions on the same machine all fired between 967,344 and 972,043 tokens. The two idle ones were recorded as "trigger": "auto", like a normal one, but with "precomputed": true, and each landed a second or two after my first message back. On GitHub, desktop-app users on Windows describe the same pattern starting on 26 and 27 October, in comments on issue #102260.
Anthropic documents the /config row for terminal sessions, so in the VS Code panel or the desktop app, use a settings file: "idleCompaction": false in ~/.claude/settings.json, which is what the notice itself suggests.
Is it idle compaction or auto-compact firing early?
A compaction far below your context window, shortly after you return from a break, is idle compaction if the idle notice is there. If you judge by token counts, idle compaction looks like auto-compact triggering at a quarter of the window, because the transcript records both as trigger: "auto". That's what issue #101067 reported as a regression, "auto-compaction fires at 281K–845K tokens", until the reporter matched every early compaction to the idle notice. Check for the notice, or for precomputed: true in the compact_boundary line of your transcript under ~/.claude/projects/. If neither is there and it still compacts early, the cause is something else: why Claude Code keeps compacting covers the auto-compact window and the thrashing loop.
Why didn't idle compaction run?
Idle compaction skips any session that misses a condition in the table above, most often a five-minute cache, less than 200,000 tokens, or a sleeping computer. The opposite complaint shows up too: a big session left for hours, then a full-price first message because nothing was compacted. Open GitHub reports add three more cases:
-
Sessions started by
claude rc. In issue #105442, about 20 sessions spawned by Remote Control's server mode were never idle-compacted, while interactive sessions shared with/rcwere. -
The
opusplanandhaikumodel aliases. In issue #103243, the 54-minute timer fires but skips withprefix_changed. Picking the same model by name works. - The five-minute cache keepalive. As reported in issue #103483, idle compaction skips sessions that aren't writing one-hour cache entries, which rules it out on accounts where the keepalive is on.
The same issue confirms "idleCompaction": true can't switch it on. Only Anthropic's server switch can.
How do I disable idle compaction in Claude Code?
To disable idle compaction in Claude Code, add "idleCompaction": false to settings.json (2.1.290 or later), or switch the Idle compaction row off in /config in a terminal on 2.1.302 or later. To keep it only for huge sessions, raise CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS instead. Each one leaves normal auto-compaction alone. That's the one that kicks in when you're about to hit the context limit mid-task, and most people want to keep it. (If auto-compaction keeps firing and the context refills straight away, that's a different problem: why Claude Code keeps compacting, and "Autocompact is thrashing".)
1. In settings.json (Claude Code 2.1.290 or later)
This is the route the notice itself points to, and the only one Anthropic documents for VS Code and the desktop app, since the /config row is documented for terminal sessions. It also covers scripts, teams, managed settings and versions before 2.1.302. Add this to a settings file:
{
"idleCompaction": false
}
If the file already has settings, add the line inside the existing braces rather than replacing the file, for example { "model": "opus", "idleCompaction": false }.
Which file you put it in decides who it applies to:
| File | Applies to |
|---|---|
~/.claude/settings.json |
You, in every project |
.claude/settings.json in the project |
Everyone working in that project, if you commit it |
.claude/settings.local.json in the project |
Only you, in that project |
| Managed settings | Everyone in your organisation, set by an admin |
Anthropic's settings reference marks idleCompaction as allowed in any of these. If you'd rather not edit JSON by hand, the Claude Code settings builder on my tools site generates a valid settings.json for you. On a version older than 2.1.290, the key is ignored.
The setting's own built-in description, from the code, is precise: "Set to false to stop Claude Code from compacting a long conversation while the session is idle. Setting it to true does not turn idle compaction on." In other words, false opts you out, but true can't force it on. Anthropic's server switch still decides that.
2. In /config (terminal, Claude Code 2.1.302 or later)
Run /config and switch the Idle compaction row off. The 2.1.302 release notes describe it as a row "for turning idle compaction off or back on", so you can switch it back the same way. This is the quickest option in a terminal on your own machine.
If you don't see the row, check claude --version first: it needs 2.1.302 or later. Anthropic's settings reference names two other causes: another settings source (managed, --settings, project or local) already sets the key, or Claude Code can't fetch feature flags, in which case idle compaction isn't running anyway. On an older version, or in VS Code or the desktop app, use settings.json above.
3. Raise the threshold with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS (2.1.290 or later)
If you like the cost saving but only want it for genuinely huge sessions, raise the minimum rather than turning it off:
export CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS=500000
That raises the threshold from 200,000 to 500,000 tokens, so mid-sized sessions are left alone while the biggest still get compacted. The 2.1.299 release notes added it officially, and it needs 2.1.290 or later. Anthropic's docs say it accepts a positive whole number and ignores anything else, and you can't go below 100,000: lower values are raised to that floor.
Don't use the older workaround. Before 2.1.290, the only way to stop idle compaction was to turn off auto-compaction entirely, with autoCompactEnabled: false or DISABLE_AUTO_COMPACT=1. Both still work, but they also remove the safety net at the context limit. Now that there's a dedicated setting, there's no reason to pay that price.
Should you turn idle compaction off?
Leave Claude Code's idle compaction on if you finish a task before walking away: the summary keeps your requests, files touched, errors and pending tasks, and your first message back skips reprocessing a 200,000-token history at full input price. Turn it off when the exact wording of the conversation is the work product. From 2.1.302 the notice itself tells you how, but first ask whether you want to.
The cost difference is real. Anthropic's caching docs explain that once the cache has expired, "the summarization request reprocesses the full history as uncached input." Compacting a few minutes before the cache expires avoids paying that on a 200,000-token conversation.
If you open a session, work on one task, and walk away when it's done, nothing of value is lost. The summary keeps what Anthropic's docs list — "your requests and intent, key technical concepts, files examined or modified with important code snippets, errors and how they were fixed, pending tasks, and current work." And you stop paying to re-send a huge, finished conversation every time you check back in.
It hurts when the conversation itself is the work product: long sessions where you've built up precise instructions, agreed conventions, or an orchestrator that coordinates subagents. That's who's been hit hardest in the issue thread. The summary keeps the gist and drops the exact wording — and for that kind of work, the exact wording is what matters.
A rough rule: if you'd be annoyed to re-explain it, turn idle compaction off. If you'd just start a fresh session anyway, leave it on and let it save you usage.
Can you get your context back after idle compaction?
Not inside the session, but it isn't gone. Claude Code saves the full transcript to disk under ~/.claude/projects/, one file per session. People in the issue thread rebuilt their context from those files. Open the transcript, find the instructions you'd given, and paste the important ones back in.
Protect standing instructions from now on. Compaction replaces the conversation, but Anthropic's docs list what reloads automatically afterwards: the system prompt, CLAUDE.md, memory and MCP tools, plus a re-read of up to five of the most recently modified files. Anything you'd hate to lose — conventions, project rules, "never touch this folder" — belongs in CLAUDE.md, not only in the chat.
If your conversation came back as something that isn't a summary, update to 2.1.318. That release fixed idle compaction replacing a conversation with a reply that was not a summary. The full transcript on disk is unaffected, so you can recover your instructions from it as above.
If you saw "Prompt is too long" when you stopped a turn mid-compaction, update: 2.1.302 fixed that error.
If you use hooks, one change landed alongside the setting. Idle compactions used to reach PreCompact and PostCompact hooks labelled manual, as if you'd typed /compact yourself. According to the Anthropic collaborator in the thread, from 2.1.290 they're labelled auto. A hook still can't tell an idle compaction from one at the context limit, but at least it no longer looks like something you did.
What changed in idle compaction recently?
Idle compaction has changed in most releases since it shipped. These are the entries from Anthropic's changelog that change what you see or how to turn it off:
| Version | Change |
|---|---|
| 2.1.290 | Minimum version for "idleCompaction": false and CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS; idle compactions reach PreCompact and PostCompact hooks as auto, not manual
|
| 2.1.299 | Idle compaction added in the terminal: a 200K+ token conversation idle for about 54 minutes is compacted before the one-hour prompt cache expires |
| 2.1.302 | Notices now say how to turn it off, and the away-path notice reads "Compacted using a summary written while you were away"; Idle compaction row added to /config; "Prompt is too long" after stopping a turn mid-compaction fixed |
| 2.1.314 | Idle compaction added to VS Code and the desktop app's Code tab; it also runs with telemetry off, and on Bedrock, Vertex, Foundry and LLM gateways once the one-hour prompt cache is on |
| 2.1.317 | Very long conversations no longer lose their earlier summary when compaction has to shorten its own request; in VS Code, forked conversations no longer lose the last messages a compaction kept |
| 2.1.318 | Fixed idle compaction replacing a conversation with a reply that was not a summary |
If any of these match what you saw, run claude update before changing settings.
Quick reference
-
Want it off?
"idleCompaction": falsein settings.json (2.1.290+, every surface), or in a terminal/config→ Idle compaction off (2.1.302+). -
Want it rarer?
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENSabove 200,000 (minimum 100,000). - On an older version? Update — downgrading won't help, and disabling auto-compact costs you the context-limit safety net.
-
Lost context? The full transcript is under
~/.claude/projects/. - Want instructions to survive any compaction? Put them in CLAUDE.md.
-
In VS Code or the desktop app? Same setting, in
~/.claude/settings.json.
Key takeaways
- 'Compacted using a summary written while you were away' and 'Compacted while idle, before the prompt cache expired' are the two notices for the same cost-saving feature: Claude Code summarises a long idle session around the time its one-hour cache expires, so your next message doesn't reprocess the whole history.
- In the code (checked in 2.1.290 and 2.1.302) it needs a one-hour cache, at least 200,000 tokens of context and about 54 minutes of inactivity — and Anthropic's server-side switch decides whether it runs at all.
- Turn it off with "idleCompaction": false in settings.json (2.1.290+, every surface), or in a terminal with the Idle compaction row in /config (2.1.302+); both keep normal auto-compaction at the context limit.
- The code is already in 2.1.285, so downgrading isn't a reliable fix; CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS can raise the threshold instead (minimum 100,000).
- The full transcript survives on disk under ~/.claude/projects/, and anything in CLAUDE.md reloads after every compaction.
- Officially since 2.1.314 it also runs in the VS Code chat panel and the desktop app's Code tab, where the notice reads 'Compacted using a summary written while you were away'. The same settings.json key turns it off; /config is documented for terminal sessions only.
For other Claude Code errors, from SSL failures to 529s, the full list of Claude Code errors and fixes groups them by cause.
If you're wondering where the usage actually goes in a long session, why Claude Code uses so many tokens breaks it down. Building long-running agent workflows that keep their footing across compactions is part of the work I do — see recent projects.
FAQ
How long does the Claude Code prompt cache last?
On a Claude subscription the main conversation gets a one-hour prompt cache, dropping to five minutes once you draw on usage credits. On an API key or a cloud provider such as Bedrock, Vertex or Foundry the default is five minutes. After the cache expires, the first message back re-sends the whole conversation, which is the cost idle compaction is designed to avoid.
Why does Claude Code say 'Compacted using a summary written while you were away'?
It's idle compaction. While you were away, Claude Code wrote a summary of the long conversation, and because your next message came after the one-hour prompt cache had expired, it used that summary instead of re-sending the whole history at full price. The full notice reads 'Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json'. The tail is the fix: set idleCompaction to false in ~/.claude/settings.json (Claude Code 2.1.290 or later), or in a terminal on 2.1.302 or later switch the Idle compaction row off in /config.
What does 'Compacted while idle, before the prompt cache expired' mean?
It's Claude Code's idle compaction notice for terminal sessions, the line Anthropic's settings reference lists: Claude Code summarised a long conversation about 54 minutes into your break, just before its one-hour prompt cache expired, so your next message is billed for the summary rather than the full context. In the code (checked in 2.1.290 and 2.1.302) it only does this for sessions on a one-hour cache with at least 200,000 tokens of context, and only when Anthropic's server-side switch is on. From 2.1.302 it ends with '· turn off with "idleCompaction": false in settings.json'.
How do I turn off idle compaction in Claude Code?
Add "idleCompaction": false to a settings.json file on Claude Code 2.1.290 or later: your user settings at ~/.claude/settings.json, or a project, local or managed settings file. That works in the terminal, VS Code and the desktop app. In a terminal on 2.1.302 or later you can instead open /config and switch the Idle compaction row off. Either way, normal auto-compaction near the context limit stays on, and setting the key to true does not force idle compaction on.
Why is Claude auto-compacting while I'm away?
That's idle compaction. On a long session of 200,000 tokens or more, Claude Code writes a summary about 54 minutes after your last message, before the one-hour prompt cache expires, and uses it when you come back. Turn it off with "idleCompaction": false in ~/.claude/settings.json (Claude Code 2.1.290 or later), or in a terminal on 2.1.302 or later with the Idle compaction row in /config.
What is CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS?
It's an environment variable, added officially in Claude Code 2.1.299 and needing 2.1.290 or later, that sets the context size at which idle compaction applies. The default is 200,000 tokens. It accepts a positive whole number, ignores anything else, and raises values below 100,000 to 100,000. Set it higher, for example 500,000, to keep idle compaction for only your biggest sessions instead of turning it off.
Does idle compaction lose context?
Yes, partly. It replaces the conversation history with a summary, so the session keeps your requests, key decisions, files touched and pending work, but not the exact wording of earlier instructions. The full transcript is still saved under ~/.claude/projects/, and CLAUDE.md reloads after every compaction, so standing instructions kept there survive.
Can I get my context back after an idle compaction?
Not inside the session — the summary replaces the verbatim conversation. The full transcript is still saved on disk under ~/.claude/projects/, so you can re-read the exact instructions from there. To protect standing instructions in future, keep them in CLAUDE.md, which reloads automatically after every compaction.
Does downgrading Claude Code stop idle compaction?
Not reliably. The idle-compaction code and its server-side switch are already present in 2.1.285, before most people noticed the behaviour. Whether it runs is controlled from Anthropic's side, so the dependable way out is the idleCompaction setting in 2.1.290 or later.
How do I disable idle compaction in VS Code or the Claude desktop app?
Add "idleCompaction": false to ~/.claude/settings.json on the machine where the session runs; Anthropic documents the /config row for terminal sessions only. Officially since Claude Code 2.1.314 (I saw it on 2.1.310), idle compaction runs in the VS Code extension's chat panel and the desktop app's Code tab as well as the terminal. There, Claude Code writes the summary while you're away and only uses it if your next message comes an hour or more after the last request, with the notice 'Compacted using a summary written while you were away'.
Why doesn't idle compaction run in my session?
It needs a one-hour prompt cache, at least 200,000 tokens of context, auto-compact on, feature-flag fetching allowed, and your computer awake about 54 minutes after the last request. Open GitHub reports add more cases: sessions started by claude rc, the opusplan and haiku model aliases, and accounts on the five-minute prompt-cache keepalive. Setting idleCompaction to true can't turn it on; only Anthropic's server switch does.
Sources
- Idle compaction silently discards working context; no opt-out (anthropics/claude-code #98747)
- Feature request: auto-compact on idle timeout to prevent cache expiry cost (anthropics/claude-code #66115)
- Prompt caching: cache lifetime — Claude Code docs
- Manage context — Claude Code docs
- Settings reference: idleCompaction — Claude Code docs
- Environment variables: CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS — Claude Code docs
- Claude Code 2.1.299 release notes: idle compaction and CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS
- Claude Code 2.1.302 release notes: Idle compaction row in /config
- Claude Code 2.1.314 release notes: idle compaction in VS Code and the desktop app, on Bedrock, Vertex, Foundry and gateways, and with telemetry off
- Claude Code changelog
- Settings reference: idle compaction in VS Code and the desktop app — Claude Code docs
- Idle compaction was enabled remotely by feature flag with no notice or opt-in (anthropics/claude-code #102260)
- Auto-compaction fires at 281K to 845K tokens on 2.1.296 (anthropics/claude-code #101067)
- Idle compaction never runs for --model opusplan or --model haiku (anthropics/claude-code #103243)
- Idle compaction never fires in sessions spawned by claude rc (anthropics/claude-code #105442)
- Let idleCompaction: true opt in to idle compaction (anthropics/claude-code #103483)
- claude-idle-compact — community mod (davidar)
Originally published at its-tahir.com.
Top comments (0)