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
{{ message }}
Repository navigation
ui-sdk: a worker freeze can be confirmed while a just-forked child still runs #4400
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.
Part of #4278. Deferred from the first review of PR #4395 (#4292).
Context
createWorkerFreezer().freeze() returns true when every PID from its last scan is stopped (packages/ui-sdk/src/server/worker-freezer.ts:39-52). A child forked between the /proc scan and its parent's SIGSTOP is in no scan.
workerStarted freezes a worker admitted during a hold and ignores the result (packages/ui-server/src/brain/turn-scope.ts:330-345). main has the same behaviour for every hold.
The identity-broker freezer returns true right after requesting STOP (packages/ui-sdk/src/server/worker-launcher.ts:1593). It is unverified whether that request confirms the stop.
Make the receipt mean the whole tree is stopped. Decide what an unconfirmed, late-admitted worker does to a hold that requires confirmation. No change to hold scheduling.
Acceptance criteria
freeze() returns true only after a scan that finds no member outside the stopped set.
A runtime test with a forking worker fails on the current code, shown by a mutation.
The identity-broker freezer's receipt is verified, or it reports unconfirmed.
A worker admitted during a confirmed-stop hold with a false or void receipt is handled fail-closed for that turn only, with a durable cause.
Added from the second review of PR #4395 (same theme): a worker freeze that throws kills the worker and skips the result observation.
held treats a thrown before as a failed hold: it calls after(false) and rejects before it queues the observation (packages/ui-server/src/brain/turn-journal.ts:365-366). after(false) kills the held workers and stops the turn (packages/ui-server/src/brain/turn-scope.ts:283-286). The process-tree freezer throws after 5 s (packages/ui-sdk/src/server/worker-freezer.ts:49). main behaves the same for every hold.
Additional acceptance criteria:
Decide whether a thrown stop is a transient failure to retry or a terminal one, for immediate and deferred holds alike. Keep the turn's final observation and accounting either way.
A freezer that throws once does not skip the result's observation, or the skip is recorded durably with its cause, and the turn's outcome names the freeze failure.
A test covers a freezer that throws once and then succeeds.
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.
Activity
schlessera commentedon Nov 21, 2026
Added from the second review of PR #4395 (same theme): a worker freeze that throws kills the worker and skips the result observation.
heldtreats a thrownbeforeas a failed hold: it callsafter(false)and rejects before it queues the observation (packages/ui-server/src/brain/turn-journal.ts:365-366).after(false)kills the held workers and stops the turn (packages/ui-server/src/brain/turn-scope.ts:283-286). The process-tree freezer throws after 5 s (packages/ui-sdk/src/server/worker-freezer.ts:49).mainbehaves the same for every hold.Additional acceptance criteria: