r/ClaudeCode • u/innociv • 3h ago
News/Updates When did they add this quick auto-compaction for resuming old sessions?
Not only have I not noticed this until today, but it also cut the tokens in half almost instantly when compaction normally takes much longer. This is a nice feature but I can't find when it was added.
4
Upvotes
•
u/AutoModerator 3h 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/innociv 3h ago
I found it myself. Looks like about 7 weeks ago https://claude-world.com/articles/claude-code-21299-release/
3
u/nezvanovova 2h ago
Apparently we had AGI weeks ago...
2
u/fatihrimeo 2h ago
There are idleCompaction and auto-compaction. Idle one is "Compacted while idle, before the prompt cache expired · turn off with "idleCompaction": false in settings.json" and auto have 400k limit by default iirc.
1
u/NotmyFinalForm_62 2h ago
Ithis showed up in v2.1.299 back in October. your session was over 200K tokens and might've already compacted while you were away
1
u/Tagred_Bicanin 1h ago
A quick note before you log off kinda helps.Next time you open the project, you'll know the tests passed and you still need to push your changes
1
u/CandidSystem6155 26m ago
It pairs well with a handoff file. Before idle compaction existed we had a hook that wrote a short handoff (what's done, what's open, next step) when a session sat idle for about 55 minutes, just before the prompt cache expires, and a SessionStart hook injected it into the next session. Compaction keeps the conversation going, but the summary is lossy, so anything we'd actually need tomorrow goes into that file rather than relying on the compacted context.
1
u/Oikon__ 20m ago
Since it runs while idle before the cache expires, it reads your history from the warm cache instead of reprocessing everything uncached like a /compact after a long break. That's why it's way faster and cheaper than compacting on a cold resume. If there's anything you really can't lose, I'd still keep it in a file Claude can reread rather than relying on the summary.
https://code.claude.com/docs/en/prompt-caching#compacting-the-conversation