Skip to content
ccmods.app

idle-compact

v0.5.0

Compacts an idle session after 50 minutes, while the prompt cache is still warm, so returning costs less usage.

by @davidar1Updated Minimal accessGitHub

Installation

  1. Install from your shell (answer y to add the marketplace)

    $ claude plugin install idle-compact --marketplace davidar/claude-idle-compact

Already in a session? Type this at the Claude Code prompt:

$ /plugin install idle-compact --marketplace davidar/claude-idle-compact

Pick a scope and the mod is active right away. Needs Claude Code 2.1.287 or later, in a terminal. Full install guide

What does idle-compact do?

  • Arms a timer after each main-loop turn and cancels it when the next turn starts or the session ends
  • Skips conversations under 40k tokens and timers that fire more than 10 minutes late
  • Runs the same compaction as /compact, telling the summariser to keep open tasks, decisions and file paths
  • Leaves a transcript line and status line with tokens before, summary size and cache-read percentage
  • idleMinutes and minTokens options are configurable

What do you need?

  • Claude Code 2.1.287 or later (terminal)
  • 1-hour prompt cache (a Claude subscription, or promptCacheTtl set to 1h)

What can this mod access?

Read from the mod's code with claude plugin validate on Claude Code 2.1.296, synced Oct 12, 2026. This is a capability list, not a security audit. Mods run with your permissions, so install only from authors you trust.

Minimal access

No file, process, network, prompt or tool-call access found.

Hooks and engine calls (4 + 9)

hooks

  • session.end
  • session.start
  • turn.complete
  • turn.start

calls

  • $.clock.after
  • $.clock.now
  • $.session.compact
  • $.session.id
  • $.session.usage
  • $.state.get
  • $.state.set
  • $.ui.log
  • $.ui.status

How do you uninstall idle-compact?

$ claude plugin uninstall idle-compact

To switch it off without removing it, use claude plugin disable with the same name.

Do you maintain idle-compact?

Add this badge to your README so users can jump to this page for the install command and access report.

Listed on ccmods.app
[![Listed on ccmods.app](https://ccmods.app/badge.svg)](https://ccmods.app/mods/idle-compact)

cache-refresher

olddonkey/cache-refresher

3

Shows when the prompt cache expires and what a rebuild would cost, with an opt-in auto-refresh while you are away.

UICommandsWorkflowModerate access
$ claude plugin install cache-refresher --marketplace olddonkey/cache-refresher

micro-compaction

ruihe774/cc-micro-compaction

2

Adds /compact micro, which elides old file reads and drops thinking instead of summarizing, keeping the rest verbatim.

WorkflowMinimal access
$ claude --plugin-dir ./cc-micro-compaction

prompt-cache-control

Nasrallah-Adel/claude-prompt-cache-control

1

Shows a prompt-cache meter above the prompt with hit rate and a countdown to expiry, and suggests /compact or /clear.

UIPromptCommandsBroad access
$ claude plugin install prompt-cache-control --marketplace Nasrallah-Adel/claude-prompt-cache-control