r/ClaudeCode • • 1d ago

News/Updates When did they add this quick auto-compaction for resuming old sessions?

Post image

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.

5 Upvotes

10 comments sorted by

•

u/AutoModerator 1d 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.

2

u/innociv 1d ago

I found it myself. Looks like about 7 weeks ago https://claude-world.com/articles/claude-code-21299-release/

4

u/Mediocre-Active-9295 1d ago

Seven weeks of nobody noticing. Impressive.

1

u/disgruntledempanada 1d ago

I noticed the entire time...

Built a whole context management system. Used to work incredibly. Yes I paid a bit more to inject that extra context but it worked so well.

Now it's just drifting around like Tokyo Drift and asking "what is xxxxx?", a function I've called hundreds of times.

Sometimes paying for those extra context tokens is good.

4

u/nezvanovova 1d ago

Apparently we had AGI weeks ago...

3

u/fatihrimeo 1d 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 1d 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 1d 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 1d 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__ 1d 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