Skip to content

Commit c479bb5

Browse files
perf(server): seek live nodes for the subagent recovery probe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 065a433 commit c479bb5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/server/src/orchestration-v2/ProjectionStore.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,9 +4098,10 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
40984098
AND EXISTS (
40994099
SELECT 1 FROM orchestration_v2_projection_nodes AS node
41004100
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
41024104
AND node.kind = 'root_turn'
4103-
AND node.status IN ('pending', 'running', 'waiting')
41044105
)
41054106
UNION
41064107
-- No native subagent outlives the provider process that ran it.

0 commit comments

Comments
 (0)