


















@@ -151,11 +151,12 @@ Agent run completion is authoritative for active task records. A successful deta
151151- Cron tasks: the cron runtime no longer tracks the job as active and durable
152152 cron run history does not show a terminal result for that run. Offline CLI
153153 audit does not treat its own empty in-process cron runtime state as authority.
154-- CLI tasks: isolated child-session tasks use the child session; chat-backed
155- CLI tasks use the live run context instead, so lingering
156- channel/group/direct session rows do not keep them alive. Gateway-backed
157-`openclaw agent` runs also finalize from their run result, so completed runs
158- do not sit active until the sweeper marks them `lost`.
154+- CLI tasks: tasks with a run id/source id use the live run context, so
155+ lingering child-session or chat-session rows do not keep them alive after the
156+ gateway-owned run disappears. Legacy CLI tasks without run identity still fall
157+ back to the child session. Gateway-backed `openclaw agent` runs also finalize
158+ from their run result, so completed runs do not sit active until the sweeper
159+ marks them `lost`.
159160160161## Delivery and notifications
161162@@ -249,7 +250,7 @@ openclaw tasks notify <lookup> state_changes
249250- ACP/subagent tasks check their backing child session.
250251- Subagent tasks whose child session has a restart-recovery tombstone are marked lost instead of being treated as recoverable backing sessions.
251252- Cron tasks check whether the cron runtime still owns the job, then recover terminal status from persisted cron run logs/job state before falling back to `lost`. Only the Gateway process is authoritative for the in-memory cron active-job set; offline CLI audit uses durable history but does not mark a cron task lost solely because that local Set is empty.
252-- Chat-backed CLI tasks check the owning live run context, not just the chat session row.
253+- CLI tasks with run identity check the owning live run context, not just child-session or chat-session rows.
253254254255Completion cleanup is also runtime-aware:
255256@@ -316,7 +317,7 @@ A sweeper runs every **60 seconds** and handles four things:
316317317318<Steps>
318319<Step title="Reconciliation">
319-Checks whether active tasks still have authoritative runtime backing. ACP/subagent tasks use child-session state, cron tasks use active-job ownership, and chat-backed CLI tasks use the owning run context. If that backing state is gone for more than 5 minutes, the task is marked `lost`.
320+Checks whether active tasks still have authoritative runtime backing. ACP/subagent tasks use child-session state, cron tasks use active-job ownership, and CLI tasks with run identity use the owning run context. If that backing state is gone for more than 5 minutes, the task is marked `lost`.
320321</Step>
321322<Step title="ACP session repair">
322323Closes terminal or orphaned parent-owned one-shot ACP sessions, and closes stale terminal or orphaned persistent ACP sessions only when no active conversation binding remains.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。