Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.198 Home All releases olderv2.1.197 v2.1.199newer

Context Fold Tool [Gradual Rollout]

Feature flag
tengu_fold_tool Not enough to say

Nothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.

This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.198: on

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.

Read once, for one account on one subscription tier, against v2.1.198. It isn't a statement about your account. What a flag value here can and cannot tell you

What

A new fold_boundary task subtype allows the harness to insert context fold points in the conversation — compressing completed work to free context budget.

Details
  • Feature-gated by tengu_fold_tool; additionally requires that the session is not running in remote/cloud mode (gr() must be false — the flag is a local-only capability)
  • 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"
  • 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)
  • 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
  • foldedCount is preserved when collapsing nested summaries: if (t.foldedCount) e.foldedCount = (e.foldedCount ?? 0) + t.foldedCount
Evidence

Feature 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

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.198 →