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.
Claude Code · Unverified · github.com · 18 Oct 2026