ClaudeCodeMod

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.

In Claude Code
/plugin install idle-compact --marketplace noash-xrc/claude-tools
Open the repo

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.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

The top of the idle compact README: it compacts a session you have walked away from just before its prompt cache expires; why compacting just before expiry is cheaper; and the rule, no request for 55 minutes and 120k tokens or more in context, then /compact with a summary that keeps the open task, and a toast.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • command.runWhen you run its slash command/idle-compact
  • prompt.submitWhen you send a prompt
  • turn.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
Repo
noash-xrc/claude-tools
Folder
idle-compact
Version
0.2.4
License
MIT
Repo stars
3
Last change
2026-10-09
Language
TypeScript
Files
5

Other mods in Usage

swiss-knifenocodehackHolds a commandChimes and turns its strip red when Claude needs you, forecasts when plan limits run out, writes handoffs, and asks before destructive commands.sesscloneNotTahaAliReports each turn's tokens, model, and timings to a SessClone dashboard, with a line above the prompt that shows whether this session is synced.context-widgetoMaN-RodDraws the context window as a stacked bar, one color per /context category, on a card under the prompt or docked beside the transcript.cost-visibilitypatitowHolds a commandDraws a two-line band above the prompt with the plan windows, this chat's list-price cost split into main and subagents, and context. /spend opens a pane.usage-barspepperonasShows the 5-hour and 7-day limits as animated bars under the prompt, with a reset countdown, a pace mark, a projection, and six styles.clawd-dashpinkpixel-devDraws a session dashboard under the prompt: plan limits, context, cost, model, effort, git status, and file changes, beside a pixel Clawd who reacts.usage-paneT-AI-LabsOpens a /tokens pane that adds up tokens, cache hit rate, and API price by day, model, and project, and lists each session's prompts by cost and why.ribbonrobonuggetsDraws a slim band above the prompt with the 7-day and 5-hour usage left and when each resets, and whether the prompt cache is warm or cold with the next cost.hudlycfyiDraws a heads-up display above the prompt: context fill, repo state, turn progress with time estimates, and a recap with an automatic /whats-next after a break.automodemralexivyHolds a commandPicks the model and effort for each prompt, draws a bar above the prompt with context, cache countdown, cost, and savings, and denies git writes from subagents.agent-tracekrika2810Draws a pane beside the chat that lists every step after a prompt: each model request, tool call, and subagent, with time, tokens, context, and API-rate cost.idle-compactdavidarCompacts 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.
All 183 in Usage