@devries-cameron20 / t3code-1 / commits / 8648aea3db
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

perf(server): seek live nodes for the subagent recovery probe (#29644)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 2, 2026 at 14:28 UTC 8648aea3db09b209751dcf2501c62b5f929710b4
1 file changed +3 -2
apps/server/src/orchestration-v2/ProjectionStore.ts
+3 -2
@@ -4098,9 +4098,10 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
4098 AND EXISTS (
4099 SELECT 1 FROM orchestration_v2_projection_nodes AS node
4100 WHERE node.thread_id = subagents.child_thread_id
4101 - AND node.run_id IS NULL
4101 + -- Matches nodes_live_idx; +run_id keeps thread_run_idx from scanning settled nodes.
4102 + AND node.status IN ('pending', 'starting', 'running', 'waiting')
4103 + AND +node.run_id IS NULL
4104 AND node.kind = 'root_turn'
4103 - AND node.status IN ('pending', 'running', 'waiting')
4105 )
4106 UNION
4107 -- No native subagent outlives the provider process that ran it.