feat(ag-ui): consume the protocol's SUBAGENT_* events and subagentRunId attribution - #955
Merged
Conversation
…on routing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nId-attributed content Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ken map churn Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First PR of the runtime-subagents arc (spec: docs/superpowers/specs/2026-09-01-runtime-subagents-design.md, plans on blove/runtime-subagents-arc).
SUBAGENT_STARTED/SUBAGENT_FINISHED/SUBAGENT_ERROR(@ag-ui/core0.0.59), normalized into the existingactivityType: 'subagent'ActivityEntry shape — thesubagents()projection needed zero changes.subagentRunId(TEXT_MESSAGE_*,TOOL_CALL_*) route into the child's card and never into the parent transcript — the same structural rule the LangGraph adapter applies to namespaced events. Events arriving before theirSUBAGENT_STARTEDcreate the entry (buffer-not-drop); a late STARTED regenerates the entry identity so cached projection wrappers pick up the real name/parentToolCallId.running(the run resumes with the same id; interrupts flow through the interrupt signal). Content-only updates flow through the entry's inner signal with no per-token map churn, matching the ACTIVITY_DELTA idiom.activityType: 'subagent'ACTIVITY path untouched (back-compat verified by the existing cockpit/ag-ui/subagents e2e).Per-runtime backend emitters (Strands, MAF, Mastra) land in follow-up PRs.
Testing
nx test ag-ui: 13 files / 241 tests green (10 new reducer specs incl. resume-cycle + buffer-not-drop generation change, 2 new projection tests, 1 transcript replay).nx lint ag-ui: 0 errors;nx build ag-ui: green.🤖 Generated with Claude Code