Skip to content

AI sub-agent tool not being displayed properly#2932

Merged
abose merged 5 commits into
mainfrom
ai
May 20, 2026
Merged

AI sub-agent tool not being displayed properly#2932
abose merged 5 commits into
mainfrom
ai

Conversation

@abose
Copy link
Copy Markdown
Member

@abose abose commented May 20, 2026

No description provided.

abose added 5 commits May 20, 2026 18:34
Pair with the phoenix-pro Agent icon mapping. Keep Task in the list
for backwards compatibility with older sessions / SDKs.
The Claude Code SDK delivers the parent agent's tool calls as a stream
of stream_event messages (content_block_start / delta / stop), but the
new Agent subagent dispatcher's internal tool calls arrive batched on
a single assistant message with parent_tool_use_id set — there is no
streaming path. The existing stream_event subagent branch was dead
code under the new dispatcher, so the user saw the parent Agent card
finish immediately and then nothing until the subagent returned.

Extract tool_use blocks from subagent assistant messages and emit
aiProgress + aiToolInfo back-to-back per block, registering each
tool_use id in _toolUseIdToCounter so the existing tool_result handler
can route the response back to the right indicator card. The cards
appear once each subagent tool completes (no streaming preview — the
SDK never gave us one), but they appear instead of being invisible.
…ed rows

Pairs with the phoenix-pro inline-subagent-steps renderer. The backend
now looks up the dispatching Agent's toolCounter from
_toolUseIdToCounter[message.parent_tool_use_id] and includes it on
both aiProgress and aiToolInfo events so the browser knows where to
render each step. Styling adds .ai-subagent-steps (left border +
indent for the nested block) and .ai-subagent-step / -icon / -label
(compact one-line rows with the secondary text size and ellipsis
truncation).
@sonarqubecloud
Copy link
Copy Markdown

@abose abose merged commit 54fefa3 into main May 20, 2026
13 of 21 checks passed
@abose abose deleted the ai branch May 20, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant