  27.072s Seeded 10 completed replay turns
  55.370s Seeded 20 completed replay turns
  80.525s Seeded 30 completed replay turns
 105.318s Seeded 40 completed replay turns
 126.764s Seeded 50 completed replay turns
 144.729s Seeded 60 completed replay turns
 169.829s Seeded 70 completed replay turns
 196.319s Seeded 80 completed replay turns
 207.772s Seeded 90 completed replay turns
 215.490s Seeded 100 completed replay turns
 215.699s History {"runs":100,"nodes":800,"messages":200}
 215.908s ACTION: observe running provider-turn updates for 4.5 seconds
 220.083s PROVIDER UPDATE: runs read = 100 rows
 220.291s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE thread_id = ? ORDER BY ordinal ASC
 220.538s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)
 220.774s PROVIDER UPDATE: runs read = 101 rows
 221.012s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE thread_id = ? ORDER BY ordinal ASC
 221.255s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)
 221.496s PROVIDER UPDATE: runs read = 10 rows
 221.732s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE thread_id = ? AND (status IN ('queued','preparing','starting','running','waiting') OR run_id IN (SELECT value FROM json_each(?)) OR run_id = ? OR run_id = ( SELECT candidate.run_id FROM orchestration_v2_projection_runs candidate WHERE candidate.thread_id = ? AND NOT ( candidate.status = 'queued' AND json_extract(candidate.payload_json, '$.queueHeld') IS 1 ) AND NOT ( candidate.status = 'cancelled' AND json_extract(candidate.payload_json, '$.startedAt') IS NULL AND candidate.completed_at IS NOT NULL AND EXISTS ( SELECT 1 FROM orchestration_v2_projection_runs earlier WHERE earlier.thread_id = candidate.thread_id AND earlier.ordinal < candidate.ordinal AND earlier.status <> 'queued' AND NOT ( earlier.status <> 'failed' AND EXISTS ( SELECT 1 FROM orchestration_v2_projection_messages prompt WHERE prompt.message_id = json_extract(earlier.payload_json, '$.userMessageId') AND ( prompt.role = 'user' AND lower(trim(json_extract(prompt.payload_json, '$.text'), char(9, 10, 11, 12, 13, 32, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288, 65279) )) = ? AND coalesce(json_array_length(prompt.payload_json, '$.attachments'), 0) = 0 AND ( json_extract(prompt.payload_json, '$.idleCompaction') IS NOT NULL OR ( json_extract(prompt.payload_json, '$.createdBy') = 'agent' AND json_extract(prompt.payload_json, '$.creationSource') = 'server' ) ) ) ) AND NOT EXISTS ( SELECT 1 FROM orchestration_v2_projection_turn_items compaction WHERE compaction.thread_id = earlier.thread_id AND compaction.run_id = earlier.run_id AND compaction.type = 'compaction' AND compaction.status = 'failed' ) ) AND ( earlier.completed_at IS NULL OR julianday(earlier.completed_at) >= julianday(candidate.completed_at) ) ) ) AND NOT ( candidate.status <> 'failed' AND EXISTS ( SELECT 1 FROM orchestration_v2_projection_messages prompt WHERE prompt.message_id = json_extract(candidate.payload_json, '$.userMessageId') AND ( prompt.role = 'user' AND lower(trim(json_extract(prompt.payload_json, '$.text'), char(9, 10, 11, 12, 13, 32, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288, 65279) )) = ? AND coalesce(json_array_length(prompt.payload_json, '$.attachments'), 0) = 0 AND ( json_extract(prompt.payload_json, '$.idleCompaction') IS NOT NULL OR ( json_extract(prompt.payload_json, '$.createdBy') = 'agent' AND json_extract(prompt.payload_json, '$.creationSource') = 'server' ) ) ) ) AND NOT EXISTS ( SELECT 1 FROM orchestration_v2_projection_turn_items compaction WHERE compaction.thread_id = candidate.thread_id AND compaction.run_id = candidate.run_id AND compaction.type = 'compaction' AND compaction.status = 'failed' ) ) ORDER BY candidate.ordinal DESC, candidate.run_id DESC LIMIT 1 ) -- Queued or cancelled turns must not hide the latest actual session. OR run_id = ? OR run_id = ( SELECT run_id FROM orchestration_v2_projection_runs WHERE thread_id = ? AND provider_thread_id IS NOT NULL AND json_extract(payload_json, '$.startedAt') IS NOT NULL AND ? IS NOT NULL ORDER BY ordinal DESC LIMIT 1 )) ORDER BY ordinal ASC
 221.987s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?); LIST SUBQUERY 1; SCAN json_each VIRTUAL TABLE INDEX 1:; CREATE BLOOM FILTER; SCALAR SUBQUERY 7; SEARCH candidate USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?); CORRELATED SCALAR SUBQUERY 4; SEARCH earlier USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=? AND ordinal<?); CORRELATED SCALAR SUBQUERY 2; SEARCH prompt USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?); CORRELATED SCALAR SUBQUERY 3; SEARCH compaction USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?); CORRELATED SCALAR SUBQUERY 5; SEARCH prompt USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?); CORRELATED SCALAR SUBQUERY 6; SEARCH compaction USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?); SCALAR SUBQUERY 8; SEARCH orchestration_v2_projection_runs USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)
 222.246s PROVIDER UPDATE: runs read = 1 rows
 222.502s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE run_id = ? AND thread_id = ?
 222.764s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)
 223.020s PROVIDER UPDATE: runs read = 1 rows
 223.280s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE run_id = ? AND thread_id = ?
 223.547s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)
 223.805s PROVIDER UPDATE: runs read = 1 rows
 224.068s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE run_id = ? AND thread_id = ?
 224.327s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)
 224.588s PROVIDER UPDATE: runs read = 1 rows
 224.840s   SQL: SELECT payload_json FROM orchestration_v2_projection_runs WHERE run_id = ? AND thread_id = ?
 225.094s   PLAN: SEARCH orchestration_v2_projection_runs USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)
 225.344s PROVIDER UPDATE: runs read = 1 rows
