Rules & settings · davila7

idle-compaction-early: idle compaction starts at 100K tokens

A Claude Code settings rule that starts idle compaction at 100K tokens instead of 200K, so idle terminal sessions are compacted before their prompt cache expires.

This text was machine-translated from the publisher's own information and has not been checked by a human editor. The publisher's original text is the reference.

This resource was imported automatically from the sources listed below and has not been reviewed by the AI Gate team yet. The description is the publisher's own, as published. Check the repository before installing.

What it does

The rule lowers the Claude Code idle compaction threshold to 100K tokens, the lowest value the tool accepts, from the default of 200K. 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 the whole conversation.

It suits developers who leave Claude Code sessions open for long periods and want resumed sessions to avoid reprocessing their full history. It is the counterpart of idle-compaction-off, which disables the feature, and the two are not meant to be used together.

Idle compaction runs only when auto-compact is enabled and the session uses the one-hour prompt cache. That cache is the default on a Claude subscription. On API billing, the ENABLE_PROMPT_CACHING_1H environment variable must be set to 1.

Limitations and requirements

Idle compaction runs only when auto-compact is on and the session uses the one-hour prompt cache. On API billing, ENABLE_PROMPT_CACHING_1H must be set to 1. Do not combine with idle-compaction-off, which turns the feature off.

Safety

Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.

Sources

  • AI Templates (aitmpl) first seen 13 Nov 2026 · last seen 18 Nov 2026 · its page on the source · figures reported by the source: aitmpl downloads 33
    idle-compaction-early

    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.

    As shown on www.aitmpl.com when we last read it
Not reviewedRules & settings
patrickjs

Java (Spring Boot, JPA) Cursor Rule

A rule file for the Cursor editor that covers Java development with Spring Boot and JPA.

Software development
Updated 14 Nov 2026
Not reviewedRules & settings
patrickjs

Blender Python Add-ons

A rule file for Blender Python add-on development, published by patrickjs.

Software development
Updated 14 Nov 2026