{"version":"2.1.198","anchor":"context-fold-tool-gradual-rollout","canonical_anchor":"context-fold-tool-gradual-rollout","heading":"Context Fold Tool [Gradual Rollout]","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.198\/e\/context-fold-tool-gradual-rollout","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.198","markdown":"### Context Fold Tool [Gradual Rollout]\n\n**What**\n\nA new `fold_boundary` task subtype allows the harness to insert context fold points in the conversation \u2014 compressing completed work to free context budget.\n\n**Details**\n\n- Feature-gated by `tengu_fold_tool`; additionally requires that the session is not running in remote\/cloud mode (`gr()` must be false \u2014 the flag is a local-only capability)\n- `vhp()` returns true when both conditions are met; `Vda()` then adds `\"fold_boundary\"` to the set of subtypes the loop dispatcher recognises alongside `\"scheduled_task_fire\"`\n- When a `fold_boundary` system message is written to the transcript, it carries a `foldedUuids` array listing the UUIDs of the messages that were compressed; the display renderer treats this subtype identically to `scheduled_task_fire` (dimmed text with a clock prefix)\n- During conversation collapsing, each `fold_boundary` message increments `foldedCount` by `foldedUuids.length`; the running total is then propagated to parent summary messages and included in the per-turn stats displayed to the user\n- `foldedCount` is preserved when collapsing nested summaries: `if (t.foldedCount) e.foldedCount = (e.foldedCount ?? 0) + t.foldedCount`\n\n**Evidence**\n\nFeature flag check (search for `tengu_fold_tool`) and new subtype (search for `\"fold_boundary\"`); collapsing logic at `o.foldedCount = (o.foldedCount ?? 0) + l.foldedUuids.length`\n\n- Flag `tengu_fold_tool`: Not enough to say (read for one account on one subscription tier against v2.1.198; this account: no value returned, anonymous baseline: no value returned, 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."}