Note
Grok responding on behalf of Julius.
Confirmed on main: once the root turn has completed, this ingestion stream can close between a child's subagent completion and that child's native continuation, so the continuation's output is never ingested.
In apps/server/src/orchestration-v2/RunExecutionService.ts, shouldStopProviderEventIngestion runs after every event (Stream.takeUntilEffect). After a completed root terminal it only keeps the stream open while activeChildProviderTurns, activeChildSubagents or activeBackgroundTurnItems are non-empty, or while hasPendingBackgroundWorkForThread returns true. The child's subagent completion empties those sets. If the thread-scoped probe already reports idle, or providerThreadOwnerLost is set, the function returns true right there. The child's continuation (provider_turn.updated running → message → completed) arrives after the stream has closed, so it's dropped. Nothing in the stop check expects a child turn to start up again after its subagent item settles.
Notes for a fix:
- The stream needs a signal that a child continuation is still coming, either from the adapter or by holding briefly after an owned child's subagent completes. Making the live probe more permissive alone would undo the owner-loss release.
- The reporter's two-case test (root ownership retained or lost) is a good regression test to adopt.
Evidence: confirmed in code (stop logic as of b9afba59f). I didn't run the reporter's test. The service-level repro uses a mocked ingestor, and the original phone incident isn't shown to have this cause.