All shelves / Mods / Usage
idle-compact
By noash-xrc
idle-compact is a Claude Code usage mod by noash-xrc.
Runs /compact on a session idle for 55 minutes with 120k tokens or more, just before the prompt cache expires, and shows a toast when it did.
Draws
Install
The marketplace name is noash-tools.
/plugin install idle-compact --marketplace noash-xrc/claude-toolsIt 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.2.4
- License
- MIT
- Repo stars
- 3
- Last change
- 2026-10-09
What it can reach
- Draws in the session
- Reads usage or context figures
Answer y to add the marketplace, then pick a scope. Restart Claude Code after an update. If the computer slept and the cache expired, it holds back your first prompt on a cold cache with a large context, compacts, and puts the prompt back in the box for you to send; prompts with images go as they are. A resumed session reads its transcript once at startup, from the default place under ~/.claude/projects, to work out the cache age. A compaction loses detail. /idle-compact off turns it off for the session, and /idle-compact 120k sets the minimum context size.
The marketplace, noash-tools, also lists reminders, context-meter, auto-effort, output-trimmer, subagent-router, savings-meter, and project-memory. Saving on the prompt cache is why this page files it under usage. smart-compact, by hellosverre, offers /compact in a dialog at good moments, before the cache expires among them. compactly, by swapnildahiphale, compacts at a break a Sonnet judge picks. This one asks nothing: after 55 minutes without a request in the main conversation, with 120k tokens or more in context and no turn running, it runs /compact and tells the summary to keep the open task, decisions made, files changed, and anything left to do. The author's reasoning is that compacting just before expiry reads the context from cache, so only the short summary is written. /idle-compact shows the context size, how long ago the last reply was, and where the last prompt came from.
Demo

What it hooks into
session.startWhen a session startscommand.runWhen you run its slash command/idle-compactprompt.submitWhen you send a promptturn.stepAt each step of a turn
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/idle-compactShow or set compaction of idle sessions before the cache expires: on, off, or a minimum context in thousands of tokens
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- noash-xrc
- Category
- Usage
- Marketplace
- noash-tools
- Folder
- idle-compact
- Version
- 0.2.4
- License
- MIT
- Repo stars
- 3
- Last change
- 2026-10-09
- Language
- TypeScript
- Files
- 5
