fix(plugins): preserve subagent lifecycle results (#126167)

This commit is contained in:
Peter Steinberger
2026-08-18 22:22:20 -07:00
committed by GitHub
parent a6b77ffc07
commit 404eddbc6a
9 changed files with 89 additions and 55 deletions
+2
View File
@@ -439,6 +439,8 @@ snapshots; OpenClaw owns all persistence and lifecycle coordination.
Gateway-backed runs return the canonical accepted `sessionKey` alongside `runId`. The field is optional in the TypeScript result only so explicit custom runtimes remain compatible.
`waitForRun(...)` returns the canonical Gateway wait result. `status` is `"ok"`, `"error"`, `"timeout"`, or `"pending"`; pending is a normal nonterminal observation, not an exception. Optional `error`, `startedAt`, `endedAt`, `stopReason`, `livenessState`, `yielded`, `pendingError`, `timeoutPhase`, `providerStarted`, and `terminalReply` metadata is preserved so callers can distinguish observation timeouts from terminal outcomes. `timeoutMs` bounds the wait call; it does not cancel the run.
<Warning>
Model overrides (`provider`/`model`) require operator opt-in via `plugins.entries.<id>.subagent.allowModelOverride: true` in config. Untrusted plugins can still run subagents, but override requests are rejected.
</Warning>