0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
comet/docs/media/forward-subagent-text
Alexandre V.L 978e8dacbb
Claude subagents: forward a foreground subagent's text and thinking (#1042)
* Claude subagents: count and open only this chat's spawns

The ● N badge counted every tagged stream the engine opened a sink for,
while the lanes card lists only the chat's spawn chips. Claude Code tags
a forked skill's traffic with its Skill call's id, the agents a subagent
starts with their own Agent call ids, and a skill passed as `/<name>`
with `forked-command-<name>`. None of them is a spawn chip of the chat,
so the badge could read 3 over an empty card (#999).

A sink (its own doc, one unit on the badge) now opens only for a spawn
chip of the chat (`is_chat_spawn`). Traffic tagged with any other id
stays in the journal.

A forked skill is the chat's own subagent, though. The Claude adapter
sets each Skill call aside until its task starts, which comes ahead of
all the fork's traffic, and re-decodes it then as a spawn named after
the skill (`Agent: /review`). Its traffic then has a card and a tab to
feed. An inline skill starts no task, and its result drops it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Claude subagents: forward a foreground subagent's text and thinking

Claude Code leaves the text and thinking blocks of a foreground subagent
(or a forked skill) out of the stream unless asked, so its tab showed
tool calls only (#1000). Runs now set CLAUDE_CODE_FORWARD_SUBAGENT_TEXT=1,
which "enables the same behavior" as `--forward-subagent-text`
(https://code.claude.com/docs/en/cli-reference). The variable rather than
the flag: a CLI older than 2.1.211 ignores it, but refuses an unknown flag.

The CLI then forwards subagents "at every nesting depth"
(https://code.claude.com/docs/en/headless). The spawn gate keeps the
agents a subagent starts in the journal, instead of badging the chat
with docs no card lists (#999).

The adapter already emitted tagged text blocks. Tagged thinking blocks
now become the subagent's reasoning, in block order. A background
subagent sends them unasked, so its tab gains its reasoning too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Forward-subagent-text demo media for the PR (live before/after stills)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-10-26 20:55:54 +00:00
..
00-before-after.png Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00
01-before-tab.png Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00
02-after-tab.png Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00
03-before-window.png Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00
04-after-window.png Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00
README.md Claude subagents: forward a foreground subagent's text and thinking (#1042) 2026-10-26 20:55:54 +00:00

Forward subagent text: demo media

Live captures for "Claude subagents: forward a foreground subagent's text and thinking" (#1000).

  • The same prompt went to two headless engines on one Mac, each in a fresh chat on Claude Code 2.1.310 with Haiku: Zeron v0.2.121 (before) and this branch (after). It asks for one foreground Agent call whose prompt is: write "The sky is blue.", run echo hi, write "The grass is green.". Both runs named the subagent "Sky, echo, grass sequence".
  • The frames are the production Shell rendered offscreen by gpui (Window::render_to_image), attached to each engine over IPC, with the subagent's tab opened as its chip opens it. They are not an OS screen recording.
  • Both tabs show the subagent's prompt twice. That is the separate bug #952 fixes.
  • 00-before-after.png puts the two tabs side by side. 01 and 02 are the tabs at full resolution. 03 and 04 are the full windows, at half size.
  • The session card's device name is blurred.