Subagent transcript in the expanded tool card

Overview

A subagent tool card keeps the delegated conversation in its expanded body. The nested transcript is rendered with the same rows, bubbles, role labels and colours as the main chat transcript, so a delegated run reads as a conversation instead of a separate widget.

What the expanded card shows

Nested turnRendered as
systemThe collapsed System prompt · N lines card the main transcript uses for the active system prompt. Its role label names the agent the run dispatched (Search), or agent for a generic delegation. Expanding it wraps the prompt inside the card at the transcript's own width — see Wrapping.
userA user chat bubble, right-aligned, with the user role label.
assistantAn assistant chat bubble with markdown, labelled with the model that ran the delegated call.
toolA compact nested tool row (verb label, one-line arguments, per-tool result summary, status dot, per-tool preview) — not a chat bubble, so the assistant→tool→assistant loop stays readable.

While the run is in flight, streamed answer deltas land in a single assistant bubble under the Subagent is working… line; the card is re-rendered into the final transcript above once the run settles.

Wrapping

The system prompt row is a shared component — buildSystemPromptRow renders both the top-level prompt card and the nested one inside an expanded subagent card — and its body is a <pre class="chat-msg__system-body"> that wraps with white-space: pre-wrap.

The prompt is plain text, not a fenced code block: its own line breaks and blank lines survive, but a long line wraps instead of running off the card. On a phone this is the difference between reading the instructions the model was given and guessing at a clipped fragment of them — an unwrapped prompt renders as one ~2000 px line inside a horizontally scrolling box, and the sideways scroll is invisible.

The markdown renderer's code-block rule (chat-markdown.css, … .chat-msg__body pre) deliberately excludes .chat-msg__system-body. That rule sets white-space: pre and, at one point of extra specificity over the prompt's own rule in chat-transcript.css, used to win the cascade: the prompt lost its wrapping in both the top-level and the nested card. Fenced code blocks in assistant replies are unaffected — they keep white-space: pre and scroll horizontally, which is what a code block should do.

Nested tool rows

A tool row inside the subagent card is rendered with the same classes the main transcript's tool card head uses — .tool-card__name for the verb label, .tool-card__args for the one-line arguments, .tool-card__result-summary for the collapsed summary and .tool-card__pill for the status dot. A delegated call therefore reads at the main card's type scale, casing, argument budget (220 characters) and dot size, instead of on a private style scale.

Naming the agent

A delegated run names the agent it dispatched, in two places:

Usage

  1. Enable the Subagent tool for the project in Settings → Project and approve a delegation (or use an @agent mention in the composer).

  2. Read the delegated conversation directly under the card head — a settled Subagent card opens itself (is-expanded), because the nested transcript IS its body. Tap the header to collapse or re-expand it; is-expanded is authoritative, so a collapsed card really hides its transcript.

  3. Read the delegated conversation top to bottom: the subagent's prompt, the delegated task, its tool calls, and its final answer.

  4. To see which agent ran, read the chip in the head or the nested system row's role label.

Expand and collapse