Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#4777 serve auto-continuation follow-ups: stale claim comment, cancelled continuation audited as failure, failed recover leaves its claim

Opened by stack72 · 11/15/2026· Shipped 11/16/2026

Follow-ups from the review of swamp-club#4693 (PR #3794), shipped as non-blocking.

  1. Stale comment. src/serve/interrupted_run_continuation.ts:340 says an operator's recover takes no claim. Since #4693, swamp workflow recover takes the same continuation claim through claimForOperatorRecover. The re-read under the claim is still needed (a recover that already finished leaves the copy out of date), so delete only the false clause.

  2. A cancelled continuation is audited as a failure. In src/serve/interrupted_run_continuation.ts (around 426-436) the cancelled terminal code is not in LOST_RACE_CODES. When a user cancels a run serve continued, serve emits workflow.auto_continue_failed and calls onDeferredLater. The next pass skips the run because it is no longer interrupted, so the only effect is a misleading audit event. Expected: a user cancel is not reported as a continuation failure.

  3. A failed operator recover leaves its claim. claimForOperatorRecover writes a local: claim before the reset is durable. workflow_recover.ts releases it only if the withdraw, reset or save throws. If the root-unit commit or push fails after that, or the CLI is killed between create and save, the claim stays while the run is still interrupted. Then:

  • serve reads a local holder as unknown, so holdInterruptedRecord returns busy on every pass and never logs why;
  • the operator's own retry is refused for up to five minutes (each recover has a new holder id), with a message giving the seconds left. Not a regression: the run waits for the operator, as every interrupted run did before #4693. Possible fixes: release the claim on any failure of the root-unit commit, or have serve treat a local claim older than OPERATOR_CLAIM_STALE_MS on a still-interrupted run as orphaned and warn once.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 10 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/16/2026, 3:06:11 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7211/15/2026, 7:47:31 PM
Editable. Press Enter to edit.

stack72 commented 11/15/2026, 11:07:35 PM

Item 2 (cancelled continuation audited as a failure) is left out of the fix: it could not be reproduced.

A probe against serve's continuation path cancelled a continued run through the active run registry in three windows:

  • straight after launch, before any step ran
  • mid-step, with the step running
  • while the step waited on a model lock another workflow held

Each time the engine caught the abort itself, settled the run as cancelled and returned normally, so the resume's terminal stayed done. Serve released the claim and emitted no workflow.auto_continue_failed and no deferral. The cancelled terminal code in resume_launcher.ts is only produced when an AbortError escapes the engine, which none of these cancels did, so a user cancel never reaches the LOST_RACE_CODES check.

Items 1 and 3 are fixed in the same change: the stale comment is gone; swamp workflow recover releases its claim on any failure, its commit included; and serve treats a recover's claim older than five minutes on the interrupted record as left behind, logs once with the recover command, and leaves the run to the operator.

Sign in to post a ripple.