dispatch: detached worker startup crash leaves a bare log, reports success #41

Closed
opened 2026-05-28 13:24:40 +00:00 by coilysiren · 0 comments
Owner

A coily dispatch headless/cascade worker can die on its first API call (e.g. the thinking-block API 400 seen in coilysiren/coily#150) before doing any work. The detached child exits within seconds, leaving only a single-line error log, while dispatch prints the cheerful "spawned" message and returns zero. Silence looks identical to "still working".

The seed prompt is a single plain-text user message (claude -p <prompt>), so it cannot itself produce a "thinking blocks cannot be modified" 400 - that arises inside Claude Code's own multi-turn loop (transient upstream), not dispatch seeding.

Fix

After spawning, spawnDetachedWorker watches the child for a short health window (SpawnHealthWindow, default 4s). A child gone that fast is a startup crash, so surface it as a nonzero error carrying the log tail instead of "spawned". ProcessAlive is a seam so the check is testable without real children.

Surfaced from coilysiren/coily#150.

A `coily dispatch headless`/cascade worker can die on its first API call (e.g. the thinking-block API 400 seen in coilysiren/coily#150) before doing any work. The detached child exits within seconds, leaving only a single-line error log, while `dispatch` prints the cheerful "spawned" message and returns zero. Silence looks identical to "still working". The seed prompt is a single plain-text user message (`claude -p <prompt>`), so it cannot itself produce a "thinking blocks cannot be modified" 400 - that arises inside Claude Code's own multi-turn loop (transient upstream), not dispatch seeding. ## Fix After spawning, `spawnDetachedWorker` watches the child for a short health window (`SpawnHealthWindow`, default 4s). A child gone that fast is a startup crash, so surface it as a nonzero error carrying the log tail instead of "spawned". `ProcessAlive` is a seam so the check is testable without real children. Surfaced from coilysiren/coily#150.
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#41
No description provided.