Claude Code 2.1.299
By Steven Van ·
Idle terminal conversations of 200K or more tokens now compact before the one-hour prompt cache expires.
Claude Code 2.1.299 adds CLAUDE_CODE_DISABLE_FILE_MENTIONS, an environment variable that gives Claude the paths of @ file mentions to read with its file tools instead of supplying the files’ contents.
Idle compaction in the terminal
A conversation with 200K or more tokens left idle for about 54 minutes is now compacted before its one-hour prompt cache expires. This avoids reprocessing the entire conversation when the next message arrives.
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes the 200K-token minimum, while setting "idleCompaction": false in settings.json turns idle compaction off. Both controls require version 2.1.290 or later.
New APIs for managed mods
- $.prompt.media lets a prompt.submit hook in a mod installed by managed settings read the bytes of an image or document attached to the prompt.
- $.session.identity() lets those mods read how the session is signed in. It also provides the organization and email when managed forceLoginOrgUUID lists that organization.
- A mod’s Text gains size, weight, mono and tabular options, and its Box gains named spacing steps from xs to xl. The bold option is deprecated in favor of weight.
Time to finish runner work on shutdown
The release notes also add --shutdown-drain-sec to the claude self-hosted-runner orchestrator. On SIGTERM, it stops polling and gives the poll in flight and running spawn hooks up to the specified number of seconds to finish.