{"version":"2.1.211","anchor":"forward-subagent-text-cli-flag","canonical_anchor":"forward-subagent-text-cli-flag","heading":"--forward-subagent-text CLI Flag","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.211\/e\/forward-subagent-text-cli-flag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.211","markdown":"### `--forward-subagent-text` CLI Flag\n\n**What**\n\nNew 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.\n\n**Usage**\n\n`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 \u2014 including `text` and `thinking` blocks \u2014 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\"` \u2014 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"}