← Back to list
01Issue
BugShippedSwamp CLIPublicTeam
Assigneesstack72
Relationships
#1785 Cancellation/--timeout skips remaining steps including `completed`/`always` branches; --timeout waits for the in-flight subprocess
Opened by randybias · 8/22/2026· Shipped 8/27/2026
Summary
swamp workflow run wf --timeout 3on a step runningsleep 20returns after ~21 s, not 3 s: the timeout is cooperative and thecommand/shellsubprocess is not signalled. The step is recordedfailed(notcancelled), the runcancelled.- After cancellation (timeout, Ctrl-C, or
swamp workflow cancel) every remaining step is skipped — including steps whose dependency condition iscompletedoralways. Cleanup/notification branches therefore never run on cancel, which is the case where operators most need them.
Steps to reproduce
jobs:
- name: main
steps:
- name: sleepy
task: { type: model_method, modelType: command/shell, modelName: sleeper, methodName: execute,
inputs: { run: "echo start; sleep 20; echo end" } }
- name: on-cancel
dependsOn: [{ step: sleepy, condition: { type: completed } }]
task: { type: model_method, modelType: command/shell, modelName: notifier, methodName: execute,
inputs: { run: echo after-cancel } }time swamp workflow run wf --timeout 3 → 20.9 s wall clock; history: sleepy: failed, on-cancel: pending, run cancelled.
Expected
--timeoutsignals the in-flight subprocess (SIGTERM then SIGKILL after a grace period) and marks the stepcancelled.always(and arguablycompleted) dependents still run after cancellation so cleanup can happen, or the reference documents explicitly that cancellation skips all branches and recommends a pattern.
Environment
swamp 20260822.011157.0-sha.06b61472, Linux x86_64.
02Bog Flow
Shipped
Click a lifecycle step above to view its details.
03Sludge Pulse
Editable. Press Enter to edit.
stack72 commented 8/27/2026, 5:05:50 PM
Thanks @randybias for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.