メインコンテンツへスキップ
永続的なバックグラウンドタスクと Task Flow の状態を検査します。サブコマンドを指定しない場合、 openclaw tasksopenclaw tasks list と同等です。 ライフサイクルと配信モデルについては バックグラウンドタスク を参照し、検出事項の完全な説明についてはその tasks audit セクションを参照してください。

使用法

openclaw tasks
openclaw tasks list
openclaw tasks list --runtime acp
openclaw tasks list --status running
openclaw tasks show <lookup>
openclaw tasks notify <lookup> state_changes
openclaw tasks cancel <lookup>
openclaw tasks audit
openclaw tasks maintenance
openclaw tasks maintenance --apply
openclaw tasks flow list
openclaw tasks flow show <lookup>
openclaw tasks flow cancel <lookup>

ルートオプション

フラグ説明
--jsonJSON を出力します。
--runtime <name>種類でフィルタします: subagentacpcron、または cli
--status <name>ステータスでフィルタします: queuedrunningsucceededfailedtimed_outcancelled、または lost

サブコマンド

list

openclaw tasks list [--runtime <name>] [--status <name>] [--json]
追跡されているバックグラウンドタスクを新しい順に一覧表示します。

show

openclaw tasks show <lookup> [--json]
タスク ID、実行 ID、またはセッションキーで 1 つのタスクを表示します。

notify

openclaw tasks notify <lookup> <done_only|state_changes|silent>
実行中のタスクの通知ポリシーを変更します。

cancel

openclaw tasks cancel <lookup>
実行中のバックグラウンドタスクをキャンセルします。

audit

openclaw tasks audit [--severity <warn|error>] [--code <name>] [--limit <n>] [--json]
古い、失われた、配信に失敗した、またはその他の不整合があるタスクと Task Flow レコードを表面化します。cleanupAfter まで保持されている失われたタスクは警告です。 期限切れまたはスタンプされていない失われたタスクはエラーです。 --code はタスクコード (stale_queuedstale_runninglostdelivery_failedmissing_cleanupinconsistent_timestamps) と Task Flow コード (restore_failedstale_waitingstale_blockedcancel_stuckmissing_linked_tasksblocked_task_missing) を受け付けます。コードごとの重大度とトリガーの詳細については バックグラウンドタスク を参照してください。

maintenance

openclaw tasks maintenance [--apply] [--json]
タスクと Task Flow の調整、クリーンアップのスタンプ付け、枝刈り、および古い cron 実行セッションレジストリのクリーンアップをプレビューまたは適用します。 cron タスクでは、古いアクティブタスクを lost とマークする前に、調整が永続化された実行ログ/ジョブ状態を使用するため、メモリ内の Gateway ランタイム状態がなくなっただけで、完了した cron 実行が誤った監査エラーになることはありません。 オフライン CLI 監査は、Gateway のプロセスローカルな cron アクティブジョブセットについて信頼できる情報源ではありません。実行 ID/ソース ID を持つ CLI タスクは、古い子セッション行が残っている場合でも、ライブの Gateway 実行コンテキストがなくなると lost とマークされます。 適用すると、メンテナンスは現在実行中の cron ジョブを保持し、cron 以外のセッション行は変更せずに、7 日より古い cron:<jobId>:run:<uuid> セッションレジストリ行も枝刈りします。

flow

openclaw tasks flow list [--status <name>] [--json]
openclaw tasks flow show <lookup> [--json]
openclaw tasks flow cancel <lookup>
タスク台帳の下にある永続的な Task Flow 状態を検査またはキャンセルします。 flow list --statusqueuedrunningwaitingblockedsucceededfailedcancelled、または lost を受け付けます。

関連