Skip to content

fix(server): keep a resumed subagent's thread live after a restart - #6

Draft
jhomra21 wants to merge 7 commits into
mainfrom
fix/resumed-subagent-thread
Draft

jhomra21 wants to merge 7 commits into
mainfrom
fix/resumed-subagent-thread

Conversation

@jhomra21

@jhomra21 jhomra21 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

After a server restart, a resumed subagent can send events for its child thread before the current run has seen that child created. routeProviderEvent drops those events, because the child thread isn't in the run's owned threads and the adoption path requires a workflow. The child thread stops updating.

Change

routeProviderEvent in RunExecutionService.ts now adopts a coordinator's child thread whenever the coordinator belongs to the run, with or without a workflow. Workflow members still map to the coordinator's child. Unowned coordinators and null child IDs are still not adopted.

Scope and approval

This is a small fix for an obvious routing bug, in RunExecutionService.ts and its test. Open issue pingdotgg#15567 has a similar symptom but a different cause (lost Codex adapter registrations after a restart), so I haven't linked it as fixed.

Verification

  • claims a resumed run-owned subagent thread before routing its child events fails on upstream main cba30591f9, at the assertion that the child thread is owned. Current main c8a606c7b7 keeps the same workflow-only guard.
  • vp env exec --node 26.12.1 -- vp test run apps/server/src/orchestration-v2/RunExecutionService.test.ts: 55 passed.
  • vp env exec --node 26.12.1 -- vp run check:changed: format, lint, knip, GraphQL and typecheck passed. Its tests had 10 failures in upstream's bootService, serviceProtection, agentScope and ServerBrowserContexts tests, which expect Linux paths and services. They fail on this Windows machine without this change.
  • Mutation check on the pre-merge branch: restoring the workflow-only condition made the same test fail, because the child ID was missing from the owned threads.
  • Not checked: a live server restart with a running subagent.

Built with Claude Opus 5.5 through Factory Droid in T3 Code. Upstream preparation by GPT-6 Luna, orchestrated by Claude Opus 5.5, through Factory Droid in T3 Code.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 16, 2026
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@jhomra21
jhomra21 force-pushed the fix/resumed-subagent-thread branch from 67946f3 to 0481157 Compare October 18, 2026 14:47
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 0481157.

This comment will update automatically after the next completed run.

@github-actions github-actions Bot added size:M and removed size:S labels Oct 30, 2026
@jhomra21
jhomra21 marked this pull request as draft October 30, 2026 02:32
@github-actions github-actions Bot added size:XXL and removed size:M labels Oct 30, 2026
@github-actions github-actions Bot added size:S and removed size:XXL labels Oct 30, 2026
@jhomra21 jhomra21 changed the title fix(server): keep a resumed subagent's thread live after a restart fix(server): track resumed subagent threads after restart Oct 30, 2026
@jhomra21 jhomra21 changed the title fix(server): track resumed subagent threads after restart fix(client-runtime): find a subagent's model by display name or alias Oct 30, 2026
@jhomra21 jhomra21 changed the title fix(client-runtime): find a subagent's model by display name or alias fix(server): keep a resumed subagent's thread live after a restart Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant