Skip to content

feat(ag-ui): consume the protocol's SUBAGENT_* events and subagentRunId attribution - #955

Merged
blove merged 4 commits into
mainfrom
blove/agui-subagent-events
Sep 2, 2026
Merged

feat(ag-ui): consume the protocol's SUBAGENT_* events and subagentRunId attribution#955
blove merged 4 commits into
mainfrom
blove/agui-subagent-events

Conversation

@blove

@blove blove commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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).

  • The reducer now handles SUBAGENT_STARTED / SUBAGENT_FINISHED / SUBAGENT_ERROR (@ag-ui/core 0.0.59), normalized into the existing activityType: 'subagent' ActivityEntry shape — the subagents() projection needed zero changes.
  • Content events carrying a 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 their SUBAGENT_STARTED create the entry (buffer-not-drop); a late STARTED regenerates the entry identity so cached projection wrappers pick up the real name/parentToolCallId.
  • Suspended outcome keeps the card 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.
  • Legacy activityType: 'subagent' ACTIVITY path untouched (back-compat verified by the existing cockpit/ag-ui/subagents e2e).
  • New runtime transcript fixture pins the full lifecycle end to end.

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.
  • Legacy ACTIVITY path: cockpit/ag-ui/subagents e2e 1/1 green in replay.
  • No public-api/barrel change.

🤖 Generated with Claude Code

blove and others added 4 commits September 2, 2026 08:38
…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>
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 2, 2026 3:56pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

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