What it does
By default, Claude Code compacts a terminal conversation longer than 200K tokens (set by CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS) when it has been idle for about 54 minutes, before its one-hour prompt cache expires. This setting turns that behaviour off.
It suits users who would rather pay to reprocess the full conversation on their next message than continue from a summary.
Idle compaction only happens when auto-compact is on and the one-hour cache is in use, so the setting has an effect only under those conditions. It should not be combined with idle-compaction-early.
Limitations and requirements
Requires Claude Code 2.1.290 or later. Idle compaction applies only when auto-compact is on and the one-hour prompt cache is in use. Do not combine with idle-compaction-early.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
Sources
- AI Templates (aitmpl) first seen 13 Nov 2026 · last seen 17 Nov 2026 · its page on the source · figures reported by the source: aitmpl downloads 85
idle-compaction-off
Turn off idle compaction (Claude Code 2.1.290+). By default, a terminal conversation over 200K tokens (CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS) that sits idle for about 54 minutes is compacted before its one-hour prompt cache expires; this only happens with auto-compact on and the one-hour cache in use. Use this if you would rather pay to reprocess the full conversation on your next message than continue from a summary. Do not combine with idle-compaction-early.
As shown on www.aitmpl.com when we last read it