Resume gracefully-interrupted subagents and take the RunState repair pins (N3 WP1) #91

Merged
weichen merged 2 commits from feature/n3-runstate-wp1 into main 2026-10-07 15:08:58 +00:00
Owner

Why: InterruptRunning wrote done.json{status:interrupted} for every child, and ResumeInterruptedChildren skipped anything with done.json — graceful shutdowns never resumed (only SIGKILL-style deaths did). Nested pins carry repairOrphanTail and the N6 fix (Agent-Native#30).

What: done markers split by status — terminal (completed/failed/cancelled) blocks resume, interrupted does not; the forged-marker guard test now asserts the correction as a user note (N6 semantics).

Evidence: go test -count=1 ./... green; TestResumeAfterGracefulInterruptMarker (exactly once), TestResumeSkipsCompletedMarker.

Impact: interrupted children with a stored request re-spawn exactly once after any restart, regardless of how the process stopped.

Refs: Agent-Native#30, Agent-Squad#34, Agent-System-Documents#43

Why: InterruptRunning wrote done.json{status:interrupted} for every child, and ResumeInterruptedChildren skipped anything with done.json — graceful shutdowns never resumed (only SIGKILL-style deaths did). Nested pins carry repairOrphanTail and the N6 fix (Agent-Native#30). What: done markers split by status — terminal (completed/failed/cancelled) blocks resume, interrupted does not; the forged-marker guard test now asserts the correction as a user note (N6 semantics). Evidence: go test -count=1 ./... green; TestResumeAfterGracefulInterruptMarker (exactly once), TestResumeSkipsCompletedMarker. Impact: interrupted children with a stored request re-spawn exactly once after any restart, regardless of how the process stopped. Refs: Agent-Native#30, Agent-Squad#34, Agent-System-Documents#43
weichen added 2 commits 2026-10-07 15:07:00 +00:00
Why: InterruptRunning wrote done.json{status:interrupted} for every
child, and ResumeInterruptedChildren skipped anything with done.json —
graceful shutdowns never resumed (only SIGKILL-style deaths did). done
markers now split by status: terminal states block resume, interrupted
does not. Nested pins carry repairOrphanTail and the N6 fix.
Evidence: go test -count=1 ./... green; TestResumeAfterGracefulInterruptMarker
(resumed once and only once), TestResumeSkipsCompletedMarker (terminal
states still block).
Impact: after any restart, interrupted children with a stored request
re-spawn exactly once regardless of how the process stopped.
Refs: Agent-Native#30, Agent-Squad#34, N3 plan WP1
Align the forged-marker guard test with the N6 semantics
ci / vet-and-test (pull_request) Successful in 50s
1770fac51f
Why: Stop.Replacement no longer rewrites the in-memory assistant; the
correction reaches the model as a user note. The guard's protective
intent is unchanged (forged body never replays as assistant speech).
Evidence: go test -count=1 ./... green.
Impact: test only.
Refs: Agent-Native#30, N3 plan WP1
weichen added 1 commit 2026-10-07 15:07:00 +00:00
Align the forged-marker guard test with the N6 semantics
ci / vet-and-test (pull_request) Successful in 50s
1770fac51f
Why: Stop.Replacement no longer rewrites the in-memory assistant; the
correction reaches the model as a user note. The guard's protective
intent is unchanged (forged body never replays as assistant speech).
Evidence: go test -count=1 ./... green.
Impact: test only.
Refs: Agent-Native#30, N3 plan WP1
weichen merged commit 7a6a6075c2 into main 2026-10-07 15:08:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#91