Output SDK ワークフロー(自動処理の流れ)の実行中の処理を中止します。 次のような場合に使用: - ワークフローをキャンセルしたいとき - 長く続いている処理を止めたいとき - 動作が止まったワークフローを終了させたいとき - 進行中のワークフローを途中で中止する必要があるとき
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.
実行中のワークフローを停止するスキルです。ワークフローは「終了」と表示され、残りのステップは実行されません。この操作は取り消せないため、慎重に使用してください。
npx output workflow debug を使用)npx output workflow stop <workflowId>
停止する前に、以下を確認してください:
例1: 動作が止まったワークフローを停止
# 状態を確認 - ワークフローが長時間実行されている
npx output workflow status abc123xyz
# Status: RUNNING (2時間実行中)
# 停止することを決定
npx output workflow stop abc123xyz
# ワークフロー abc123xyz は停止されました
# 停止状態を確認
npx output workflow status abc123xyz
# Status: TERMINATED
例2: 誤った入力で開始したワークフローをキャンセル
# 開始直後に入力が間違っていたことに気づいた
npx output workflow start expensive-job --input '{"wrong": "input"}'
# ワークフロー ID: job-abc123
# 処理が進む前に停止
npx output workflow stop job-abc123
# 正しい入力で再度開始
npx output workflow start expensive-job --input '{"correct": "input"}'
例3: 複数のワークフローを停止
# 実行中のワークフロー一覧を取得
npx output workflow runs list --json | jq '.[] | select(.status == "RUNNING") | .workflowId'
# 各々を停止する(事前に十分確認してください)
for id in abc123 def456; do
echo "停止中: $id"
npx output workflow stop $id
done
npx output workflow status <workflowId>
# Status: TERMINATED
npx output workflow debug <workflowId> --json
以下の情報が表示されます:
ワークフローが部分的な変更を加えた場合:
# 新しい実行を開始する
npx output workflow start <workflowName> --input '<input>'
npx output workflow runs list を使用して有効な ID を確認docker ps | grep outputnpx output workflow debug を使用して状態を把握するnpx output workflow status <id> - 現在のステータスを確認npx output workflow debug <id> - 実行の詳細を確認npx output workflow start <name> - 新しい実行を開始npx output workflow runs list - 実行履歴を表示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 --input '{"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 --input '{"correct": "input"}'
Scenario: Stop multiple workflows
# Get list of running workflows
npx output workflow runs list --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> --json
This shows:
If the workflow made partial changes:
# Start a fresh execution
npx output workflow start <workflowName> --input '<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原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。