{"version":"2.1.318","anchor":"claudemd-truncation-gate-swapped-tengu-velvet-possum-repla","canonical_anchor":"claudemd-oversize-trimming-reworked-in-headless-mode-gated","heading":"CLAUDE.md trimming in non-interactive runs now uses a total size budget","tier":"notice","area":"Instruction Files","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/claudemd-truncation-gate-swapped-tengu-velvet-possum-repla","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### CLAUDE.md trimming in non-interactive runs now uses a total size budget\n\nBehind a new remote switch, non-interactive sessions trim Project CLAUDE.md files only when all instructions together exceed a budget\n\n**Unclear.** Two further conditions decide which non-interactive sessions reach this rule, and what they check is not known.\n\n**What**\n\nCLAUDE.md files hold instructions that Claude Code loads into every conversation. A non-interactive session is one that runs with no person typing, such as a script. The rule for cutting oversized CLAUDE.md files in these sessions has been rewritten.\n\n- Before, each oversized file was cut against a size limit set by the model. This was controlled by the remote switch `tengu_velvet_possum`, which is no longer read in this build.\n\n- Now Claude Code works out a total budget from the main model and the `autoCompactWindow` setting, which controls how full the conversation gets before Claude Code summarizes it.\n\n- Files are cut only when all instruction files together exceed that budget, and only when the Project files alone account for the overage.\n\n- When that happens, each Project CLAUDE.md file is cut to about a tenth of the budget divided by the number of Project files. Each file is marked so that only its beginning is kept.\n\n- This whole step sits behind the new remote switch `tengu_temporal_haven`, which falls back to false in the code.\n\n- Outside the switch, two new internal checks (`Nu()` and `tf(r)`) must pass. The old checks for which tools were present are replaced by a single check that one tool is absent.\n\nIn readings taken before this release, Anthropic's servers returned both `tengu_temporal_haven` and `tengu_velvet_possum` off for this site's account and for a signed-out baseline. No reading has been taken under this release.\n\n**Why**\n\nIf the switch is turned on, a large project CLAUDE.md is no longer cut just for being big on its own. It is cut only when your instructions together would not fit the budget, so headless runs may keep more or less of it than before.\n\n- Flag `tengu_temporal_haven`: Off in both readings (read for one account on one subscription tier against v2.1.318; this account: off, anonymous baseline: off, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Flag `tengu_velvet_possum`: Off in both readings (read for one account on one subscription tier against v2.1.318; this account: off, anonymous baseline: off, compiled default: not a boolean we can read) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Instruction Files\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}