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.211 Home All releases olderv2.1.210 v2.1.212newer
Claude Code v2.1.211

--forward-subagent-text CLI Flag

What

New flag for --print mode that forwards subagent text and thinking blocks as structured assistant/user messages with parent_tool_use_id set, enabling callers to reconstruct the full agent conversation tree from the stream.

Usage
claude --print --output-format=stream-json --forward-subagent-text "your prompt"
Details
  • Requires both --print and --output-format=stream-json. When explicitly specified on the CLI without those flags, the process exits with: "Error: --forward-subagent-text requires --print and --output-format=stream-json." When the option is supplied programmatically via the SDK forwardSubagentText: true init-config field, it silently degrades to false rather than erroring if the output conditions are not met.
  • Without the flag, only tool_use and tool_result content blocks from subagent turns are forwarded upstream in the progress event stream. With the flag enabled, all content types — including text and thinking blocks — are forwarded.
  • Forwarded subagent messages are emitted as progress events (data.type === "agent_progress") carrying the full assistant or user message wrapper. The stream-json serializer converts these into top-level assistant/user message events with parent_tool_use_id set to the spawning agent's tool-use ID, allowing callers to reconstruct the full agent conversation tree.
  • When forwardSubagentText is active, thinking blocks in subagent turns are not suppressed: the thinking configuration object is returned unchanged rather than having its display property overridden to "omitted" — which is the default behaviour for non-interactive stream-json sessions.
  • Allows external tooling (CI pipelines, orchestration layers) to receive the complete content of nested subagent turns rather than only the top-level result.
Evidence

New CLI flag added to the argument parser (search for "--forward-subagent-text"); forwarding gate (search for "forwardSubagentText" near "tool_use" and "tool_result" checks); thinking-config passthrough in Flc function

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.211 →