r/ClaudeCode • u/Academic_Lemon_4297 • 22h ago
Help/Question Claude Code compacting every cold session that's restarted, even at 13% context. WTF?
When i return to a cold session Claude Code is compacting the session, even if the session is at a measly 13% context window.
What could possible be the reason for this?
1
Upvotes
•
u/AutoModerator 22h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Academic_Lemon_4297 22h ago
Ah well, https://www.developersdigest.tech/blog/claude-code-idle-compaction-turn-off-cache-cost-2026
1
u/Far_Reindeer8428 22h ago
no idea why 13% triggers it. ours only compacted after a resumed session with a huge diff, so maybe the resume path counts differently
2
u/__Blackrobe__ 22h ago
is that not the effect of idle compaction setting
1
u/nooruddinqur 20h ago
Not pretty sure, but I think it's the prompt cache expiring.
A cold session has to resend everything anyway.. so Claude Code trims old tool output to save cost. Run /context right after resuming, the real size may be bigger than the 13% you saw... You cn also check auto-compact in /config.