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

Relationships

#2930 Method-run records left running by a dead owner are never reaped

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

Description

Found while triaging swamp-club#2918. When the process that owns a method run dies before saving the run's final state (second Ctrl-C force exit, the canceller's SIGKILL after OWNER_STOP_GRACE_MS, a crash, or a method that ignores its signal past the owner's step stop grace), the method-run output record (ModelOutput, saved by markRunning with the owner's pid) stays at running forever with no completedAt.

Nothing reconciles these records: run doctor --fix, workflow recover and settleDeadOwnerRun (src/domain/workflows/orphaned_run_reaper.ts) settle workflow-run records only, and serve's boot reaper does the same. In addition, swamp workflow cancel does not complete the method-run tracker rows owned by the process it stopped (only swamp model cancel does), so those rows stay running until a stale-run reap.

Steps to reproduce

  1. Run a workflow whose shell step ignores SIGTERM for longer than the owner's grace, or force-exit the owner with a second Ctrl-C while a step runs.
  2. swamp model method history search --json

Expected

A method-run record still at running whose recorded pid is no longer alive is settled (cancelled or interrupted, with completedAt) by the same paths that settle dead-owner workflow runs (settleDeadOwnerRun / run doctor --fix / workflow cancel), and workflow cancel completes the stopped owner's method tracker rows as model cancel does.

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

Shipped

10/2/2026, 1:22:15 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/2/2026, 12:18:20 AM

Sign in to post a ripple.