You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The health verdict reaches 2 of 5 loop-run readers; the three it misses are the supervisor and the owner
f01d5b4 (#580 AC3) added runHealth so a client would stop inferring liveness. It has exactly two production consumers (grep -rn "runHealth\|isStalled(\|waitClause" workers/api/src workers/mcp/src store | grep -v test → 8 hits, 2 call sites): routes/tools.ts:1046 and work-report.ts:203.
console "Autonomous runs" (LoopRunsSection.tsx:152) → step 1/40 · started 4h ago + a Stop button
Mechanism
subordinate-payload.ts:177 and :228 — activity = runs.some((r) => r.status === "running") ? "working" : "idle", the raw column.
subordinate-observation.ts:152 — quietForMinutes: minutesSince(r.lastProgressAt ?? r.startedAt, now), the column agent-loop-store.ts:69-74 explicitly calls "NOT a liveness signal, and it was read as one for two releases".
instance-work.ts:233-234 does not SELECT last_alive_at, waiting_reason, waiting_until — the supervision path cannot produce a verdict.
The description sells the wrong surface hardest (supervision.ts:550): "What every agent you supervise is doing RIGHT NOW… 'which ones are idle' is roster[].activity."
Two comments are now false
run-sweeper.ts:67 — "the same rule summarizeSubordinates uses, so the sweeper and the supervisor still agree on 'quiet'". The sweeper uses COALESCE(last_alive_at, last_progress_at, started_at) (:70); summarizeSubordinates uses lastProgressAt ?? startedAt.
workInFlight.ts:28 — "A run is live only while the server says running; every terminal state is a different word." Since fd1c323, running covers working, waiting and stalled.
Why this misleads into a wrong action
run-sweeper.ts:9-11 already names the victim: "subordinate_status reports it as work in flight, so a supervisor keeps waiting on an agent that stopped hours ago." A Coder Lead blocks on a dead subordinate; the owner sees a Stop button for a run that stopped itself.
Acceptance criteria
Every reader of agent_loop_runs applies the same verdict, or explicitly declines to make a liveness claim. subordinate-payload.ts:177 is the single highest-value line.
instance-work.ts's SELECT carries the columns a verdict needs.
The health verdict reaches 2 of 5 loop-run readers; the three it misses are the supervisor and the owner
f01d5b4(#580 AC3) addedrunHealthso a client would stop inferring liveness. It has exactly two production consumers (grep -rn "runHealth\|isStalled(\|waitClause" workers/api/src workers/mcp/src store | grep -v test→ 8 hits, 2 call sites):routes/tools.ts:1046andwork-report.ts:203.The five readers of
agent_loop_runs:routes/tools.ts:1055,1063(/loop)agent-think.ts:451→describeLoopRuntool-registry.ts:231,247(check_work)connectors/supervision.ts:714(check_delegation)lib/instance-work.ts:223→subordinate_statusstore/console/src/lib/workInFlight.ts:29+tabs/LoopRunsSection.tsx:96Three answers, one run, same instant
For a run parked 4.35 h on an engine limit:
check_instance_loop→health:"waiting",waitNote:"WAITING, not stalled and not working…"subordinate_status→activity:"working",quietForMinutes: 261LoopRunsSection.tsx:152) →step 1/40 · started 4h ago+ a Stop buttonMechanism
subordinate-payload.ts:177and:228—activity = runs.some((r) => r.status === "running") ? "working" : "idle", the raw column.subordinate-observation.ts:152—quietForMinutes: minutesSince(r.lastProgressAt ?? r.startedAt, now), the columnagent-loop-store.ts:69-74explicitly calls "NOT a liveness signal, and it was read as one for two releases".instance-work.ts:233-234does notSELECT last_alive_at, waiting_reason, waiting_until— the supervision path cannot produce a verdict.The description sells the wrong surface hardest (
supervision.ts:550): "What every agent you supervise is doing RIGHT NOW… 'which ones are idle' isroster[].activity."Two comments are now false
run-sweeper.ts:67— "the same rulesummarizeSubordinatesuses, so the sweeper and the supervisor still agree on 'quiet'". The sweeper usesCOALESCE(last_alive_at, last_progress_at, started_at)(:70);summarizeSubordinatesuseslastProgressAt ?? startedAt.workInFlight.ts:28— "A run is live only while the server saysrunning; every terminal state is a different word." Sincefd1c323,runningcovers working, waiting and stalled.Why this misleads into a wrong action
run-sweeper.ts:9-11already names the victim: "subordinate_statusreports it as work in flight, so a supervisor keeps waiting on an agent that stopped hours ago." A Coder Lead blocks on a dead subordinate; the owner sees a Stop button for a run that stopped itself.Acceptance criteria
agent_loop_runsapplies the same verdict, or explicitly declines to make a liveness claim.subordinate-payload.ts:177is the single highest-value line.instance-work.ts's SELECT carries the columns a verdict needs.workingbysubordinate_status.Verified vs inferred