openclaw tasks 等同于 openclaw tasks list。
请参阅后台任务了解生命周期和投递模型,并查看其中的 tasks audit 小节以获取完整的问题说明。
用法
根选项
| 标志 | 描述 |
|---|---|
--json | 输出 JSON。 |
--runtime <name> | 按类型筛选:subagent、acp、cron 或 cli。 |
--status <name> | 按状态筛选:queued、running、succeeded、failed、timed_out、cancelled 或 lost。 |
子命令
list
show
notify
cancel
audit
cleanupAfter 的丢失任务是警告;已过期或未打标记的丢失任务是错误。
--code 接受任务代码(stale_queued、stale_running、lost、delivery_failed、missing_cleanup、inconsistent_timestamps)和 Task Flow 代码(restore_failed、stale_waiting、stale_blocked、cancel_stuck、missing_linked_tasks、blocked_task_missing)。请参阅后台任务,了解每个代码的严重性和触发条件详情。
maintenance
lost,因此已完成的 cron 运行不会仅因为内存中的 Gateway 网关运行时状态消失就变成误报审计错误。离线 CLI 审计不能作为 Gateway 网关进程本地 cron 活动作业集合的权威来源。带有运行 ID/来源 ID 的 CLI 任务会在其实时 Gateway 网关运行上下文消失时被标记为 lost,即使旧的子会话行仍然存在。
应用后,维护还会裁剪超过 7 天的 cron:<jobId>:run:<uuid> 会话注册表行,同时保留当前正在运行的 cron 作业,并保持非 cron 会话行不变。
flow
flow list --status 接受 queued、running、waiting、blocked、succeeded、failed、cancelled 或 lost。