Description
On OpenClaw 2026.7.1-beta.2, when a subagent spawned via sessions_spawn completes successfully (with output, task done), the gateway logs record the completion as error level instead of info:
2026-07-07T21:19:16.836+08:00 error [agent] run <runId> ended with stopReason=stop
2026-07-07T21:19:26.808+08:00 error [agent] run announce:v1:agent:executor:subagent:<id>:<runId> ended with stopReason=stop
The subagent actually completed successfully — it produced output, the parent session received the result, and the task was verified as done. There is no actual failure.
Expected behavior
stopReason=stop on a successful subagent run should be logged at info level, not error level.
Regression
On older logs (April 2026, pre-2026.5.x), the same stopReason=stop message appeared at info level (no error prefix). This appears to be a regression introduced in a recent version.
Note: This is distinct from the known stopReason=stop payloads=0 failure case (where the agent actually failed to generate a response). In our case, payloads > 0 and the task completed successfully.
Environment
- OpenClaw version: 2026.7.1-beta.2 (a580a7f)
- OS: macOS 26.5.2 (arm64)
- Node: v24.14.1
- Subagent spawned via:
sessions_spawn with mode="run" (background task)
Steps to reproduce
- Spawn a subagent with
sessions_spawn(agentId="executor", mode="run", task="..."
- Wait for subagent to complete successfully
- Check gateway logs:
openclaw logs --limit 200
- Observe
error [agent] run ... ended with stopReason=stop even though task succeeded
Additional context
Related historical fix: #70396 ("stopReason=stop 时不再误报 Agent couldn't generate a response") — this regression may be related.
Description
On OpenClaw 2026.7.1-beta.2, when a subagent spawned via
sessions_spawncompletes successfully (with output, task done), the gateway logs record the completion aserrorlevel instead ofinfo:The subagent actually completed successfully — it produced output, the parent session received the result, and the task was verified as done. There is no actual failure.
Expected behavior
stopReason=stopon a successful subagent run should be logged atinfolevel, noterrorlevel.Regression
On older logs (April 2026, pre-2026.5.x), the same
stopReason=stopmessage appeared atinfolevel (noerrorprefix). This appears to be a regression introduced in a recent version.Note: This is distinct from the known
stopReason=stop payloads=0failure case (where the agent actually failed to generate a response). In our case, payloads > 0 and the task completed successfully.Environment
sessions_spawnwithmode="run"(background task)Steps to reproduce
sessions_spawn(agentId="executor", mode="run", task="..."openclaw logs --limit 200error [agent] run ... ended with stopReason=stopeven though task succeededAdditional context
Related historical fix: #70396 ("stopReason=stop 时不再误报 Agent couldn't generate a response") — this regression may be related.