Stop a running Output SDK workflow execution. Use when cancelling a workflow, stopping a long-running process, terminating a stuck workflow, or when you need to abort a workflow in progress.
This skill stops a running workflow execution. The workflow will be marked as TERMINATED and will not complete its remaining steps. Use this carefully as it cannot be undone.
npx output workflow debug instead)npx output workflow stop <workflowId>
Before stopping, consider:
Scenario: Stop a stuck workflow
# Check status - workflow has been running too long
npx output workflow status abc123xyz
# Status: RUNNING (for 2 hours)
# Decide to stop it
npx output workflow stop abc123xyz
# Workflow abc123xyz has been stopped
# Verify it's terminated
npx output workflow status abc123xyz
# Status: TERMINATED
Scenario: Cancel a workflow started with wrong input
# Realized input was wrong immediately after starting
npx output workflow start expensive-job '{"wrong": "input"}'
# Workflow ID: job-abc123
# Stop before it processes too much
npx output workflow stop job-abc123
# Start again with correct input
npx output workflow start expensive-job '{"correct": "input"}'
Scenario: Stop multiple workflows
# Get list of running workflows
npx output workflow runs list --format json | jq '.[] | select(.status == "RUNNING") | .workflowId'
# Stop each one (carefully review first!)
for id in abc123 def456; do
echo "Stopping $id"
npx output workflow stop $id
done
npx output workflow status <workflowId>
# Status: TERMINATED
npx output workflow debug <workflowId> --format json
This shows:
If the workflow made partial changes:
# Start a fresh execution
npx output workflow start <workflowName> '<input>'
npx output workflow runs list to find valid IDsdocker ps | grep outputnpx output workflow debug to understand statenpx output workflow status <id> - Check current statusnpx output workflow debug <id> - Review execution detailsnpx output workflow start <name> - Start a new executionnpx output workflow runs list - View execution history