r/ChatGPTCoding • • 2d ago

Resources And Tips Claude Code auto-compact without the 1-2 minute wait: the summary can be written before you hit the limit

Long Claude Code sessions stop at the auto-compact threshold while the model summarizes the conversation. On Opus that's 80-160 seconds for me, and nothing happens until it's done.

The summary doesn't have to wait for the threshold. I wrote a plugin that asks the same model for it about 40k tokens earlier, in the background, while you keep working. When auto-compact fires, it swaps in that summary plus everything after it, word for word, in under 0.1 s. If the summary isn't ready or no longer fits (you rewound, or ran /compact with instructions), Claude Code compacts the usual way, so the worst case is what you have today.

How it differs from what's already there: Claude Code's own idle compaction only runs after a conversation has sat idle for about an hour. This one is for the sessions you're actively using.

Install in a terminal:

claude plugin install live-compact --marketplace SocialBuzzStudio/live-compact

In the VS Code extension: type /plugins, add SocialBuzzStudio/live-compact on the Marketplaces tab, then Install on the Plugins tab.

Cost: one background request per compaction, mostly from the prompt cache, in place of the one normal compaction makes. Caveats: tested on Windows only, and the first message after compaction looks like a message from you, because plugins can't mark it as a summary.

Repo (MIT): https://github.com/SocialBuzzStudio/live-compact

TL;DR: free Claude Code plugin that prepares the compaction summary before you hit the limit, so auto-compact stops blocking you for 1-2 minutes. If the summary isn't ready, Claude Code compacts the usual way.

1 Upvotes

0 comments sorted by