{"slug":"claude-code-turn-off-idle-compaction-when-the-chat-is-the-record","title":"Turn off idle compaction when the chat is the record","summary":"Claude Code handles this as a draft: A long terminal session can be compacted while you are away. Version 2.1.302 adds an Idle compaction row in /config so you can turn that off, and the notice after a compaction says how. You decide whether the raw chat still has to be there.","agent":"Claude Code","agentSlug":"claude-code","category":"Coding","categorySlug":"coding","roles":["Software engineer"],"roleSlugs":["software-engineer"],"industries":["Software"],"industrySlugs":["software"],"jobs":["shipping-code"],"topic":"Dev & Coding","topicSlug":"dev-and-coding","score":18,"difficulty":"easy","estCost":"Claude Code 2.1.302 or later on the plan you already use. The release notes do not add a separate charge for the /config row.","costTier":"low","timeSaved":"Avoiding a surprise summary of a long session you still needed verbatim. An estimate, not a measurement.","prompt":"I am in a Claude Code terminal session. Do not compact this conversation, and do not start a new task.\n\nTell me, from the release notes only:\n- What idle compaction does to a long idle terminal conversation.\n- How to turn it off from the Idle compaction row in /config.\n- The settings.json key and the environment variable that change the token minimum, and which version those need.\n\nIf you are not sure a control exists in this install, say so. Do not edit settings.json, do not run /config for me, and do not delete or summarize the current chat unless I ask after I have read your note.","steps":[{"title":"Update to Claude Code 2.1.302 or later","detail":"The 16 Oct 2026 release adds an Idle compaction row to /config for turning idle compaction off or back on. The notices shown after an idle compaction say how to turn it off."},{"title":"Read the notice, then decide","detail":"The 14 Oct 2026 release (2.1.299) says a terminal conversation above 200K tokens left idle for about 54 minutes is compacted before the one-hour prompt cache expires. If you still need that raw chat, turn idle compaction off. If a summary is enough, leave it on."},{"title":"Stop","detail":"You change the setting. The agent does not edit settings.json and does not compact the session as part of this playbook."}],"sourceUrl":"https://github.com/anthropics/claude-code/releases/tag/v2.1.302","sourceNote":"GitHub release v2.1.302, published 16 Oct 2026 by ashwin-ant. The page returned HTTP 200 on 18 Oct 2026. It adds an Idle compaction row to /config and says the notices after an idle compaction explain how to turn it off. The 200K-token and about-54-minute description is from release v2.1.299, published 14 Oct 2026, which also names CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS and \"idleCompaction\": false (both need v2.1.290 or later): https://github.com/anthropics/claude-code/releases/tag/v2.1.299. That page returned HTTP 200 on 18 Oct 2026. Prompt and stop rules are an AI Playbook Gems adaptation, not a vendor quote; unverified.","date":"2026-10-18","verified":false,"status":"unverified","sponsorUrl":"","metrics":[{"label":"Hands-on time","value":"Reading the notice and choosing one setting"},{"label":"You still approve","value":"Whether the raw conversation is kept"}],"faq":[{"question":"Has this Claude Code playbook been re-run for the catalog?","answer":"No. Status is unverified. The v2.1.302 and v2.1.299 release pages were checked on 18 Oct 2026. The prompt is an adaptation."},{"question":"What stays human?","answer":"The decision to turn idle compaction off. The release adds the control. It does not say a person must keep every session verbatim."}],"url":"https://aiplaybookgems.com/usecases/claude-code-turn-off-idle-compaction-when-the-chat-is-the-record","jsonUrl":"https://aiplaybookgems.com/api/usecases/claude-code-turn-off-idle-compaction-when-the-chat-is-the-record"}