idle-compact is a Claude Code usage mod by davidar.
Compacts an idle session after 50 minutes, while the prompt cache is still warm, and pins a status line under the prompt with the before and after sizes.
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
Version
0.5.0
License
MIT
Repo stars
4
Last change
2026-10-09
What it can reach
Draws in the session
Reads usage or context figures
Needs Claude Code 2.1.287 or later. It assumes the 1-hour prompt cache a Claude subscription gets within its usage limits; on a 5-minute cache, an API key, Bedrock, Vertex or Foundry by default, it has nothing to offer. Compaction is lossy: you come back to a summary, not the full transcript. Set idleMinutes (50) and minTokens (40000) with /plugin configure idle-compact@idle-compact. The README also lists it in the Anthropic Directory, as /plugin install idle-compact@anthropic-plugin-directory, reviewed by Anthropic before each version goes live; install one or the other, not both. To try it without installing: claude --plugin-dir /path/to/claude-idle-compact.
The marketplace, idle-compact, holds only this plugin. Saving on the prompt cache is why this page files it under usage. idle-compact, by noash-xrc, runs /compact on a session idle for 55 minutes with 120k tokens or more and shows a toast when it did. smart-compact, by hellosverre, offers /compact in a dialog above the prompt at good moments, before the prompt cache expires among them. This one asks nothing and waits 50 minutes with no activity. It leaves a conversation under 40k tokens alone, counting the Messages row of /context, and does not compact when the timer fires more than 10 minutes late, as when the machine slept. The compaction tells the summariser that you stepped away and to keep open tasks, decisions and their reasons, follow-ups with dates, file paths, and anything you asked to remember. It writes a line to the transcript and pins a status line under the prompt with the sizes and how much of the summary request the prompt cache served; the status line goes away when the next turn starts. The README's example is a 367k-token session. The transcript records the compaction as a manual one.
Demo
Screenshot of the author's GitHub page.
What it hooks into
turn.startWhen Claude starts a turn
turn.completeWhen a turn ends
session.endWhen a session ends
session.startWhen a session starts
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's README and source, 4 files. They load when you open them.