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

Relationships

#2431 workflow recover crashes on every invocation: 'Path must be a string'

Opened by hammz · 9/23/2026· Shipped 9/23/2026

Problem

swamp workflow recover crashes on every invocation, before it looks up the workflow or the run:

$ swamp workflow recover <workflow>
[FTL] error: TypeError: Path must be a string, received "{"telemetry":true,"color":true,"acknowledgeUnknown":false,"assessOnly":false}"
    at assertPath (https://jsr.io/@std/path/1.1.4/_common/assert_path.ts:6:11)
    ...

--run <id>, --assess-only, and --acknowledge-unknown make no difference, and a workflow name that does not exist crashes the same way. That makes checkpoint recovery (swamp-club#2153) unreachable from the CLI. It is also the command serve's boot reaper tells operators to run: Boot: N workflow run(s) interrupted by crash — recover with 'swamp workflow recover <workflow>'.

Cause

src/cli/commands/workflow_recover.ts calls resolveRepoDir(options) with the whole options object. resolveRepoDir in src/cli/context.ts takes the --repo-dir value (string | undefined), and every other command passes options.repoDir. Type checking does not catch it because the action types options as AnyOptions. The command has no test file, so no test runs the action.

Present on main since the command was added in a3123298 (swamp-club#2153).

Fix approach

Pass options.repoDir as the other commands do, and add a command-level test that runs workflow recover against an initialized temp repo with an interrupted run, covering both --assess-only and a real recovery, so the action is exercised end to end.

Reproduction

  1. In any initialized repo, swamp workflow recover <any-workflow-name>.
  2. The command exits 1 with the Path must be a string TypeError above.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 11 MOREREVIEW+ 13 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/23/2026, 11:05:38 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/23/2026, 7:31:17 PM

Sign in to post a ripple.