Claude Code v2.1.299 Adds Idle Compaction, File Mention Control, and Tool Disabling
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_TOKENSchanges the 200K-token minimum threshold."idleCompaction": falseinsettings.jsonturns 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.medialets aprompt.submithook read the bytes of an attached image or document.$.session.identity()exposes how the session is signed in, plus org and email whenforceLoginOrgUUIDlists that org.skill.promptnow receives the skill's frontmatter, source, plugin name, and file path.session.appendgets aqueuedoor so a mod can diverge transcript queue records from the prompt as sent.- Mod
Textgainssize,weight,mono, andtabular;boldis deprecated in favor ofweight.Boxgets named spacing stepsxsthroughxl.
Notable fixes
- Sessions on a gateway-specific model behind a custom
ANTHROPIC_BASE_URLno 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-dirfolder, 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
👀 See Also

Claude Opus 4.1 scores 17.75% on SWE-Bench Pro's private dataset, highlighting memorization vs. reasoning gap
Claude Opus 4.1 scored 80% on SWE-Bench Verified but dropped to 17.75% on SWE-Bench Pro's private dataset of 276 tasks from 18 proprietary startup codebases. Scale AI's analysis found models were navigating by memory rather than reasoning on familiar repositories.

Claude Opus 4.5 and Sonnet 4.5 removed from /model selection, require launch flag
Claude Opus 4.5 and Sonnet 4.5 are no longer available in the /model selection menu during sessions. Users must now start sessions with the --model flag specifying the full model ID to access these older versions.

User Reports Sonnet 4.6 Outperforms Opus 4.6 for Practical Coding Tasks
A developer testing Claude AI models found that Opus 4.6 produced over-engineered solutions with performance gaps, while Sonnet 4.6 delivered more careful, efficient fixes with lower token usage.

India and UAE partner on AI sovereignty with Cerebras supercomputers
India and the UAE have partnered to deploy a Cerebras-powered AI supercomputer on Indian soil, bypassing US cloud giants. The G42 deal gives India machine ownership and data governance control.