fix(subagents): return completion message for manual session spawns

This commit is contained in:
Peter Steinberger
2026-02-18 02:52:23 +01:00
parent f6f5cda6ca
commit fa4f66255c
9 changed files with 138 additions and 4 deletions

View File

@@ -169,6 +169,7 @@ Behavior:
- Sub-agents are not allowed to call `sessions_spawn` (no sub-agent → sub-agent spawning).
- Always non-blocking: returns `{ status: "accepted", runId, childSessionKey }` immediately.
- After completion, OpenClaw runs a sub-agent **announce step** and posts the result to the requester chat channel.
- If the assistant final reply is empty, the latest `toolResult` from sub-agent history is included as `Result`.
- Reply exactly `ANNOUNCE_SKIP` during the announce step to stay silent.
- Announce replies are normalized to `Status`/`Result`/`Notes`; `Status` comes from runtime outcome (not model text).
- Sub-agent sessions are auto-archived after `agents.defaults.subagents.archiveAfterMinutes` (default: 60).