























@@ -0,0 +1,98 @@
1+---
2+summary: "CLI reference for `openclaw tasks` (background task ledger and Task Flow state)"
3+read_when:
4+ - You want to inspect, audit, or cancel background task records
5+ - You are documenting Task Flow commands under `openclaw tasks flow`
6+title: "`openclaw tasks`"
7+---
8+9+# `openclaw tasks`
10+11+Inspect durable background tasks and Task Flow state. With no subcommand,
12+`openclaw tasks` is equivalent to `openclaw tasks list`.
13+14+See [Background Tasks](/automation/tasks) for the lifecycle and delivery model.
15+16+## Usage
17+18+```bash
19+openclaw tasks
20+openclaw tasks list
21+openclaw tasks list --runtime acp
22+openclaw tasks list --status running
23+openclaw tasks show <lookup>
24+openclaw tasks notify <lookup> state_changes
25+openclaw tasks cancel <lookup>
26+openclaw tasks audit
27+openclaw tasks maintenance
28+openclaw tasks maintenance --apply
29+openclaw tasks flow list
30+openclaw tasks flow show <lookup>
31+openclaw tasks flow cancel <lookup>
32+```
33+34+## Root Options
35+36+- `--json`: output JSON.
37+- `--runtime <name>`: filter by kind: `subagent`, `acp`, `cron`, or `cli`.
38+- `--status <name>`: filter by status: `queued`, `running`, `succeeded`, `failed`, `timed_out`, `cancelled`, or `lost`.
39+40+## Subcommands
41+42+### `list`
43+44+```bash
45+openclaw tasks list [--runtime <name>] [--status <name>] [--json]
46+```
47+48+Lists tracked background tasks newest first.
49+50+### `show`
51+52+```bash
53+openclaw tasks show <lookup> [--json]
54+```
55+56+Shows one task by task ID, run ID, or session key.
57+58+### `notify`
59+60+```bash
61+openclaw tasks notify <lookup> <done_only|state_changes|silent>
62+```
63+64+Changes the notification policy for a running task.
65+66+### `cancel`
67+68+```bash
69+openclaw tasks cancel <lookup>
70+```
71+72+Cancels a running background task.
73+74+### `audit`
75+76+```bash
77+openclaw tasks audit [--severity <warn|error>] [--code <name>] [--limit <n>] [--json]
78+```
79+80+Surfaces stale, lost, delivery-failed, or otherwise inconsistent task and Task Flow records.
81+82+### `maintenance`
83+84+```bash
85+openclaw tasks maintenance [--apply] [--json]
86+```
87+88+Previews or applies task and Task Flow reconciliation, cleanup stamping, and pruning.
89+90+### `flow`
91+92+```bash
93+openclaw tasks flow list [--status <name>] [--json]
94+openclaw tasks flow show <lookup> [--json]
95+openclaw tasks flow cancel <lookup>
96+```
97+98+Inspects or cancels durable Task Flow state under the task ledger.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。