mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:00:44 +00:00
fix(subagents): retire stale unended runs
Co-authored-by: HCL <chenglunhu@gmail.com>
This commit is contained in:
@@ -343,6 +343,18 @@ Sub-agents use a dedicated in-process queue lane:
|
||||
- Lane name: `subagent`
|
||||
- Concurrency: `agents.defaults.subagents.maxConcurrent` (default `8`)
|
||||
|
||||
## Liveness and recovery
|
||||
|
||||
OpenClaw does not treat `endedAt` absence as permanent proof that a sub-agent
|
||||
is still alive. Unended runs older than the stale-run window stop counting as
|
||||
active/pending in `/subagents list`, status summaries, descendant completion
|
||||
gating, and per-session concurrency checks.
|
||||
|
||||
After a gateway restart, stale unended restored runs are pruned unless their
|
||||
child session is marked `abortedLastRun: true`. Those restart-aborted child
|
||||
sessions remain recoverable through the sub-agent orphan recovery flow, which
|
||||
sends a synthetic resume message before clearing the aborted marker.
|
||||
|
||||
## Stopping
|
||||
|
||||
- Sending `/stop` in the requester chat aborts the requester session and stops any active sub-agent runs spawned from it, cascading to nested children.
|
||||
|
||||
Reference in New Issue
Block a user