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

Relationships

#2918 A cancelled workflow exits before its steps stop, leaving their method-run records at running

Opened by hammz · 10/1/2026· Shipped 10/1/2026

Description

Split out of swamp-club#2915. The other half of #2915 (workflow-step method runs recorded as failed instead of cancelled when the run is aborted) is fixed with swamp-club#2910; this issue is the part that fix does not cover.

When the process that owns a workflow run gets SIGTERM, it exits about 0.6 s later, without waiting for its in-flight shell steps to finish their 3 s SIGTERM-to-SIGKILL grace (KILL_GRACE_MS, src/infrastructure/process/process_executor.ts). A step still stopping when the process exits never reaches the step executor's catch block, so its method-run output record is never written past running and stays at running indefinitely, with no completedAt. The tracker row is completed only by whoever ran the cancel.

Reproduced on 20261001.174510.0-sha.265caa01 while triaging #2910; the owner exited with code 1, not 130 or 137, so it is a normal exit that does not wait for the steps.

Steps to reproduce

  1. Two command/shell models whose execute method traps TERM, writes to a file and sleeps: trap 'echo got >> trap.txt; sleep 5; exit 0' TERM; sleep 60 & wait
  2. A workflow with one step per model and no dependsOn.
  3. swamp workflow run in one shell.
  4. After a few seconds, from a second shell: swamp model cancel --all (swamp workflow cancel should show the same).
  5. swamp model method history search --json

Expected

The owning process waits for its in-flight steps to stop (bounded by the kill grace) and saves each step's method-run record as cancelled before it exits.

Actual

The owner exits about 0.6 s after SIGTERM. Both method-run records stay at running indefinitely.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 11 MOREREVIEW+ 9 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/1/2026, 11:29:19 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz10/1/2026, 8:37:49 PM

Sign in to post a ripple.