Claude Code v2.1.299 Adds Idle Compaction, File Mention Control, and Tool Disabling

✍️ OpenClawRadar📅 Published: October 14, 2026🔗 Source
Ad

Claude Code v2.1.299 is out, and the headline change is idle compaction: a conversation sitting at 200K+ tokens that's been idle for roughly 54 minutes gets compacted automatically, right before its one-hour prompt cache expires. The point is that your next message doesn't reprocess the entire context window from scratch.

Idle compaction controls

  • CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes the 200K-token minimum threshold.
  • "idleCompaction": false in settings.json turns it off entirely.
  • Both options require v2.1.290 or later.

File mentions and tool control

CLAUDE_CODE_DISABLE_FILE_MENTIONS changes how @ file mentions work — instead of injecting file contents, Claude only gets the paths and reads them using its own file tools. Useful when you don't want file bodies dumped into context.

For eval workflows, claude plugin eval now accepts --disallow-tools plus a disallowed_tools case field, letting you keep built-in tools like Agent out of eval runs.

Self-hosted runner and hooks

claude self-hosted-runner orchestrator gains --shutdown-drain-sec: on SIGTERM it stops polling and gives the in-flight poll and running spawn hooks up to N seconds to wrap up.

Mod hooks picked up new capabilities:

  • $.prompt.media lets a prompt.submit hook read the bytes of an attached image or document.
  • $.session.identity() exposes how the session is signed in, plus org and email when forceLoginOrgUUID lists that org.
  • skill.prompt now receives the skill's frontmatter, source, plugin name, and file path.
  • session.append gets a queue door so a mod can diverge transcript queue records from the prompt as sent.
  • Mod Text gains size, weight, mono, and tabular; bold is deprecated in favor of weight. Box gets named spacing steps xs through xl.
Ad

Notable fixes

  • Sessions on a gateway-specific model behind a custom ANTHROPIC_BASE_URL no longer died with "Prompt is too long · automatic compaction failed" near 200K tokens.
  • A mod submitting a prompt at the end of every turn could push headless runs past --max-turns, --max-budget-usd, interrupts, or conversation end — fixed.
  • Installed mods turned off remotely now unload between turns instead of continuing in an open session.
  • Edit and Retry in Cowork and claude.ai cloud sessions failed on messages stopped mid-hook (regression from 2.1.296) — fixed.
  • A sandboxed shell command could write into a --plugin-dir folder, whose code Claude Code reloads and runs outside the sandbox — now blocked.
  • Debug logging (--debug, --debug-file) no longer grows memory unbounded, and no longer hangs on exit when the log is on a stalled network or disk mount.

Also new: CLAUDE_CODE_ATTRIBUTION_HEADER=0 removes the attribution block in Claude Code sessions and Claude Desktop's Code tab, and /usage now warns about max effort, workflows, always-on context, and large tool results. Agent view picks up /effort and /fast for setting new-session defaults.

📖 Read the full source: GitHub Claude-Code

Ad

👀 See Also