{"name":"--forward-subagent-text","slug":"forward-subagent-text","family":"cli","title":"CLI flags","noun":"CLI flag","description":"Emit [subagent](\/docs\/en\/sub-agents) text and thinking blocks in the output stream as `assistant` and `user` messages with `parent_tool_use_id` set, so you can reconstruct each subagent's transcript. Without this flag, Claude Code omits the text and thinking blocks of a subagent that runs in the [foreground](\/docs\/en\/sub-agents#run-subagents-in-foreground-or-background). Requires `--print` and `--output-format stream-json`. Claude Code also forwards messages from [nested subagents](\/docs\/en\/sub-agents#let-subagents-spawn-their-own-subagents), setting `parent_tool_use_id` to the ID of the Agent or Skill tool call that started each one; this requires Claude Code v2.1.219 or later, and messages of subagents that a forked skill spawns, and of nested forked skills, require v2.1.275 or later. The [`CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`](\/docs\/en\/env-vars) environment variable enables the same behavior. Requires Claude Code v2.1.211 or later","description_source":"docs","described_by":{"doc":"claude-code\/cli-reference","title":"CLI reference"},"presence":{"first_seen":"2.1.211","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":86,"mined_builds":149,"first_cited":{"version":"2.1.211","released_at":"2026-07-15 19:24:07","spans":1}},"aliases":[],"entries":[{"version":"2.1.211","anchor":"forward-subagent-text-cli-flag","heading":"--forward-subagent-text CLI Flag","line":null,"released_at":"2026-07-15 19:24:07","reason":"found in this entry's text"}],"entries_total":1,"docs":[{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":true},{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":false},{"source":"claude-code","path":"headless","title":"Run Claude Code programmatically","documented":false},{"source":"claude-code","path":"whats-new\/2026-w29","title":"Week 29 \u00b7 July 13\u201317, 2026","documented":false}],"docs_total":4,"gates":[],"related":[{"name":"--forward-home-settings","slug":"forward-home-settings","description":"The hidden --no-home-settings flag becomes --forward-home-settings true or false, so you can force it on."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/cli\/forward-subagent-text","family_url":"https:\/\/changelogs.core-directive.com\/reference\/cli.json"}