Skip to content

feat(eve): forwarding delegated subagent stream events to the parent session stream (#666) - #1725

Open
iroiro147 wants to merge 1 commit into
vercel:mainfrom
iroiro147:fix/666-subagent-stream-forwarding-v2
Open

feat(eve): forwarding delegated subagent stream events to the parent session stream (#666)#1725
iroiro147 wants to merge 1 commit into
vercel:mainfrom
iroiro147:fix/666-subagent-stream-forwarding-v2

Conversation

@iroiro147

Copy link
Copy Markdown
Contributor

Summary

Supersedes #667 (rebased onto latest main at 19862ccf; the v1 branch drifted after upstream session-delivery-hooksession-command-inbox + Runtime.runcreateSession renames).

  • Child (delegated task-mode) turn stream events are durably autosaved into the parent session stream as subagent.event entries, ordered by child step index.
  • The parent's final delegated subagent result is unchanged — only the stream path gains durable forwards.
  • Type/index plumbing updated to the post-fix(eve): route preview workflows to latest deployment #616 rename map (stampMessageStreamEvent, UnstampedMessageStreamEvent, createSession, session.continuation.rekey).

Validation

  • vitest run --config vitest.unit.config.ts src/execution/ — 594/594 pass (62 files).
  • tsc --noEmit clean.

Closes #666.

…session stream (vercel#666)

Autosaves child turn stream events into the parent stream as durable
subagent.event entries, ordering them by the child step index.
Preserves the delegated subagent result unchanged for the parent's
final result mapping.

Signed-off-by: iroiro147 <sarthak.singh@mastersunion.org>
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@iroiro147 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

await input.writer.write(encodeMessageStreamEvent(stampedEvent));

if (input.forwardedSubagentStream !== undefined) {
const forwardedWriter = input.forwardedSubagentStream.parentWritable.getWriter();

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.

A failed write when forwarding a child subagent's event to the parent session's durable stream propagates out and crashes the child's turn, even though the child's own stream write already succeeded.

Fix on Vercel

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.

Feature request: forward task-mode subagent stream events to the parent session's stream

1 participant