03 Anthropic Dev toolsAgents

Claude Code v2.1.299: idle long conversations get compacted before the cache expires

GitHub release card for anthropics/claude-code v2.1.299
Image: GitHub Concept illustration (generated)

What is it?

In the terminal, a conversation over 200K tokens that sits idle for about 54 minutes now gets compacted before its one-hour prompt cache (the stored prefix that saves recomputing the same context) expires. Change the token threshold with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, or turn it off with "idleCompaction": false in settings.json. A new CLAUDE_CODE_DISABLE_FILE_MENTIONS variable makes @ file mentions pass only the path instead of the contents.

npm install -g @anthropic-ai/claude-code@2.1.299

Why does it matter?

Come back from lunch to a long session and you no longer pay to reprocess the whole conversation. It also closes a few permission holes: an allow rule for mcp__a no longer covers a server named a__b, macOS sandbox deny rules now hold through symlinks, and plan mode no longer runs writes that a PreToolUse hook approved.

Maturity

GAStable release. Idle compaction only runs in the terminal, and its settings are read by v2.1.290 or later.

How to track it

  • Default changes: subscribe to GitHub Releases to see if the 200K-token or 54-minute thresholds move.
  • Coverage: check the Claude Code docs changelog for idle compaction landing in the desktop app or IDE extensions.
  • Security fixes: if your MCP allow rules lean on broad prefixes, review them now.

More from the same day