Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
When a parent/main agent spawns a subagent with sessions_spawn mode="run", the child raw completion output is delivered to the original QQBot direct chat instead of only being returned internally to the parent/main session.
Steps to reproduce
1.In a QQBot direct conversation, ask the main agent to spawn a subagent/worker with sessions_spawn using mode="run".
2. Use a worker task that returns a clearly identifiable raw result, for example:
Compute 1+1. Return only: worker_result: <answer>. Do not message the user.
3. Let the parent/main agent wait for the worker completion and then produce a normal user-facing summary, for example:
1+1=2
4. Observe the message actually received by the QQBot user.
Expected behavior
The child/subagent completion should be delivered only to the parent/main session as an internal completion event.
The QQBot user should receive only the parent/main user-facing summary, for example:
1+1=2
The QQBot user should not receive the worker raw output, for example:
worker_result: 2
Actual behavior
The QQBot user received only the worker raw output:
worker_result: 2
The parent/main summary was not delivered to the QQBot chat.
OpenClaw version
openclaw 2026.6.1 Latest
Operating system
Linux 6.12.30+ x64
Install method
docker
Model
chatgpt/gpt-5.5
Provider / routing chain
openclaw -> chatgpt provider
Additional provider/model setup details
This does not appear to be model-specific. The repro used a parent/main agent on chatgpt/gpt-5.5 and a spawned subagent on chatgpt/gpt-5.4.
The issue appears to be in subagent completion routing / outbound delivery, not in model generation quality.
No API keys, tokens, or private routing details included.
Logs, screenshots, and evidence
## Log evidence
No explicit gateway error was logged. The evidence is the session/trajectory trace showing that:
- `sessions_spawn` created a child subagent.
- The child completed with raw assistant text `worker_result: 2`.
- A later announcement run appeared under the QQBot direct session.
- The parent/main trace produced a summary, but `didSendViaMessagingTool=false`.
- The session then contains a `delivery-mirror` assistant message with the raw worker result.
Relevant local log/session sources:
- `/home/node/.openclaw/agents/main/sessions/7aa0e8b7-8cd3-4734-b8b1-b19305f11c7c.jsonl`
- `/home/node/.openclaw/agents/main/sessions/7aa0e8b7-8cd3-4734-b8b1-b19305f11c7c.trajectory.jsonl`
- `/home/node/.openclaw/agents/main/sessions/b2ac0316-9391-4ece-868e-ba39872fba01.jsonl`
- `/home/node/.openclaw/agents/main/sessions/b2ac0316-9391-4ece-868e-ba39872fba01.trajectory.jsonl`
### Parent/main session log
{"line":10,"timestamp":"2026-06-06T03:28:56.600Z","role":"assistant","toolCall":{"name":"tool_call","arguments":{"id":"openclaw:core:sessions_spawn","args":{"task":"Compute 1+1. Return only one line: worker_result: <answer>. Do not call external tools. Do not send messages to the user.","taskName":"worker_test_1_plus_1","label":"worker return routing test","mode":"run","context":"isolated","cleanup":"keep"}}},"api":"openai-responses","provider":"chatgpt","model":"gpt-5.5"}
{"line":11,"timestamp":"2026-06-06T03:29:05.709Z","role":"toolResult","text":"sessions_spawn accepted: childSessionKey=agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31 runId=b587311c-67e3-4ac3-9c35-b5451d98a3e3 mode=run taskName=worker_test_1_plus_1"}
{"line":12,"timestamp":"2026-06-06T03:29:08.679Z","role":"assistant","text":"Worker test dispatched: `worker_test_1_plus_1`. I will wait for the completion event and summarize from main.","api":"openai-responses","provider":"chatgpt","model":"gpt-5.5"}
{"line":13,"timestamp":"2026-06-06T03:29:17.660Z","role":"assistant","text":"Worker completed. Main summary: 1+1=2. The chat user should receive this main summary, not the raw worker result `worker_result: 2`.","api":"openai-responses","provider":"chatgpt","model":"gpt-5.5"}
{"line":14,"timestamp":"2026-06-06T03:29:20.540Z","role":"assistant","text":"worker_result: 2","api":"openai-responses","provider":"openclaw","model":"delivery-mirror"}
Parent/main trajectory
{"line":8,"type":"session.started","ts":"2026-06-06T03:29:13.457Z","sessionKey":"agent:main:qqbot:direct:<QQBOT_DIRECT_CHAT_REDACTED>","runId":"announce:v1:agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31:b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5"}
{"line":12,"type":"model.completed","ts":"2026-06-06T03:29:20.022Z","sessionKey":"agent:main:qqbot:direct:<QQBOT_DIRECT_CHAT_REDACTED>","runId":"announce:v1:agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31:b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5","assistantTexts":["Worker completed. Main summary: 1+1=2. The chat user should receive this main summary, not the raw worker result `worker_result: 2`."]}
{"line":13,"type":"trace.artifacts","ts":"2026-06-06T03:29:20.024Z","sessionKey":"agent:main:qqbot:direct:<QQBOT_DIRECT_CHAT_REDACTED>","runId":"announce:v1:agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31:b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5","finalStatus":"success","assistantTexts":["Worker completed. Main summary: 1+1=2. The chat user should receive this main summary, not the raw worker result `worker_result: 2`."],"didSendViaMessagingTool":false,"messagingToolSentTexts":[],"messagingToolSentTargets":[],"toolMetas":[]}
Child/subagent session log
{"line":5,"timestamp":"2026-06-06T03:29:06.538Z","role":"user","text":"[Subagent Context] You are running as a subagent (depth 1/1). Results auto-announce to your requester; do not busy-poll for status.\n\n[Subagent Task]\n\nCompute 1+1. Return only one line: worker_result: <answer>. Do not call external tools. Do not send messages to the user.\n\nBegin. Execute the assigned task to completion."}
{"line":6,"timestamp":"2026-06-06T03:29:10.852Z","role":"assistant","text":"worker_result: 2","api":"openai-responses","provider":"chatgpt","model":"gpt-5.5"}
Child/subagent trajectory
{"line":1,"type":"session.started","ts":"2026-06-06T03:29:06.306Z","sessionKey":"agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31","runId":"b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5"}
{"line":5,"type":"model.completed","ts":"2026-06-06T03:29:11.370Z","sessionKey":"agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31","runId":"b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5","assistantTexts":["worker_result: 2"]}
{"line":6,"type":"trace.artifacts","ts":"2026-06-06T03:29:11.371Z","sessionKey":"agent:main:subagent:ae2bf3eb-0649-4a91-a626-bef0edd32f31","runId":"b587311c-67e3-4ac3-9c35-b5451d98a3e3","provider":"chatgpt","modelId":"gpt-5.5","finalStatus":"success","assistantTexts":["worker_result: 2"],"didSendViaMessagingTool":false,"messagingToolSentTexts":[],"messagingToolSentTargets":[],"toolMetas":[]}
Summary
{"role":"assistant","text":"worker_result: 2","api":"openai-responses","provider":"openclaw","model":"delivery-mirror"}
Impact and severity
Additional information
Additional information
No response
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
When a parent/main agent spawns a subagent with sessions_spawn mode="run", the child raw completion output is delivered to the original QQBot direct chat instead of only being returned internally to the parent/main session.
Steps to reproduce
1.In a QQBot direct conversation, ask the main agent to spawn a subagent/worker with
sessions_spawnusingmode="run".2. Use a worker task that returns a clearly identifiable raw result, for example:
Compute 1+1. Return only: worker_result: <answer>. Do not message the user.3. Let the parent/main agent wait for the worker completion and then produce a normal user-facing summary, for example:
1+1=24. Observe the message actually received by the QQBot user.
Expected behavior
The child/subagent completion should be delivered only to the parent/main session as an internal completion event.
The QQBot user should receive only the parent/main user-facing summary, for example:
1+1=2The QQBot user should not receive the worker raw output, for example:
worker_result: 2Actual behavior
The QQBot user received only the worker raw output:
worker_result: 2The parent/main summary was not delivered to the QQBot chat.
OpenClaw version
openclaw 2026.6.1 Latest
Operating system
Linux 6.12.30+ x64
Install method
docker
Model
chatgpt/gpt-5.5
Provider / routing chain
openclaw -> chatgpt provider
Additional provider/model setup details
This does not appear to be model-specific. The repro used a parent/main agent on
chatgpt/gpt-5.5and a spawned subagent onchatgpt/gpt-5.4.The issue appears to be in subagent completion routing / outbound delivery, not in model generation quality.
No API keys, tokens, or private routing details included.
Logs, screenshots, and evidence
Impact and severity
Additional information
Additional information
No response