14 October 2026
وقف تكلفة جلسات Claude Code الخاملة مع الـ idle compactionStop paying for idle Claude Code sessions with idle compaction
You will understand how Claude Code compacts a long idle session before its cache expires, set it up the way you want, and prepare a session before you walk away.
Who this guide is for
Founders, developers and creators who leave Claude Code sessions open for hours and come back to them.
Key terms
- Context
- Everything Claude Code sends with each message: your instructions, the conversation and tool results. The bigger it is, the more each message costs.
- Prompt cache
- Temporary storage on the server that keeps the processed part of your conversation so it is not processed again. It expires after a period of inactivity.
- TTL
- How long the cache lives. On a Claude subscription within your plan usage it is one hour for the main conversation. With an API key or usage credits it is five minutes, unless you set it yourself.
- Compaction
- Replacing a long conversation history with a short summary so the context gets smaller.
- Idle compaction
- A feature that compacts an idle conversation automatically before its cache expires. Listed in the 2.1.299 release notes.
The steps
Step 1
Check your Claude Code version
The 2.1.299 release notes describe the feature and its settings, and the minimum for the feature itself is version 2.1.290. Open a terminal and run the command. If your version is older, update it the same way you installed it.
PromptVersion checkclaude --version
7 more steps wait for you after access
With the ready prompts and the takeaway
Bought this before? Restore your access
Your access is tied to your email. Enter it here and the content opens right away, any time, on any device
Most value
Start building with me now
We sit together, break down your problem, and I build the AI solution with you step by step
- A private session with you
- Real building during the session
- Results you take with you when we finish
100% free
A free consultation about your problem
