Back to Settings

Idle Compaction Early

Settings environment 15 Scanned by NVIDIA SkillSpector

Start idle compaction at 100K tokens instead of 200K (Claude Code 2.1.290+). A terminal conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so the next message does not reprocess it all. 100K is the lowest value Claude Code accepts. Idle compaction only runs when auto-compact is on and the session uses the one-hour prompt cache (the default on a Claude subscription; set ENABLE_PROMPT_CACHING_1H=1 on API billing). Do not combine with idle-compaction-off, which turns the feature off.

Install Command
npx claude-code-templates@latest --setting environment/idle-compaction-early
View on GitHub
claude-code — idle-compaction-early

Scanned by NVIDIA SkillSpector

Automated static analysis (no LLM) · v2.12.0 · 2026-10-17

0 observations
scanner score 0/100

SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them.

No observations.

Learn more about NVIDIA SkillSpector.

Content

JSON
{
"description": "Start idle compaction at 100K tokens instead of 200K (Claude Code 2.1.290+). A t..."
"env": {
"CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS": "100000"
}
}

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.