openclaw - 💡(How to fix) Fix [Bug] Subagent announce leaks raw tool output to Telegram and duplicates parent progress reply [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

On OpenClaw 2026.5.7 running on Linux, a Telegram DM parent session spawned three mode=run subagents. After a simple user follow-up (sim, pode seguir), the parent sent the same progress acknowledgement twice and then the Telegram chat received large raw code/tool-output blocks from subagent completion handling, including paths like:

/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,

This looks like a regression/variant of stale subagent announce output leaking tool results into the requester session/channel.

Root Cause

On OpenClaw 2026.5.7 running on Linux, a Telegram DM parent session spawned three mode=run subagents. After a simple user follow-up (sim, pode seguir), the parent sent the same progress acknowledgement twice and then the Telegram chat received large raw code/tool-output blocks from subagent completion handling, including paths like:

/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,

This looks like a regression/variant of stale subagent announce output leaking tool results into the requester session/channel.

Fix Action

Fixed

Code Example

/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,

---

line 545 user: sim, pode seguir
line 549 assistant: Vou seguir com o **MC4 Discovery** agora. Vou dividir em frentes paralelas...
line 553 sessions_spawn -> agent:main:subagent:d4147361-740d-43f7-a42f-1ec78e2ab818
line 555 sessions_spawn -> agent:main:subagent:49041306-beb7-4afb-9cd8-9803f7fe8e95
line 557 sessions_spawn -> agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24

---

Vou seguir com o MC4 Discovery agora. Vou dividir em frentes paralelas e exigir saída prática: APIs reais, arquivos/funções, lacunas e recomendação de desenho.

---

line 46 toolResult exec:
/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,
/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:411:  PluginControlUiDescriptor: PluginControlUiDescriptorSchema,
/root/openclaw/src/gateway/protocol/schema/types.ts:137:export type PluginControlUiDescriptor = SchemaType<"PluginControlUiDescriptor">;
/root/openclaw/src/gateway/protocol/schema/plugins.ts:6:export const PluginControlUiDescriptorSchema = Type.Object(
...

---

[Inter-session message] sourceSession=agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24 sourceChannel=webchat sourceTool=subagent_announce isUser=false
[Internal task completion event]
source: subagent
...

---

[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu ... active=3 ...
[fetch-timeout] ... likely event-loop starvation ... Telegram getMe
[context-overflow-diag] sessionKey=agent:main:subagent:49041306-beb7-4afb-9cd8-9803f7fe8e95 ... Context overflow: estimated context size exceeds safe threshold during tool loop.
[context-overflow-diag] sessionKey=agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24 ... Context overflow: estimated context size exceeds safe threshold during tool loop.
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.5.7 running on Linux, a Telegram DM parent session spawned three mode=run subagents. After a simple user follow-up (sim, pode seguir), the parent sent the same progress acknowledgement twice and then the Telegram chat received large raw code/tool-output blocks from subagent completion handling, including paths like:

/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,

This looks like a regression/variant of stale subagent announce output leaking tool results into the requester session/channel.

Environment

  • OpenClaw: 2026.5.7
  • Host: Linux x64, Node 22.22.0
  • Channel: Telegram DM
  • Parent session key: agent:main:telegram:default:direct:378478304
  • User message timestamp: 2026-05-09T21:29:16Z
  • User text: sim, pode seguir

What happened

Parent transcript /root/.openclaw/agents/main/sessions/71f5753f-d183-4748-a03b-66fdaf2c07f4.jsonl:

line 545 user: sim, pode seguir
line 549 assistant: Vou seguir com o **MC4 Discovery** agora. Vou dividir em frentes paralelas...
line 553 sessions_spawn -> agent:main:subagent:d4147361-740d-43f7-a42f-1ec78e2ab818
line 555 sessions_spawn -> agent:main:subagent:49041306-beb7-4afb-9cd8-9803f7fe8e95
line 557 sessions_spawn -> agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24

The user observed the progress message twice in Telegram:

Vou seguir com o MC4 Discovery agora. Vou dividir em frentes paralelas e exigir saída prática: APIs reais, arquivos/funções, lacunas e recomendação de desenho.

Then large raw tool/code output appeared in chat. The raw leaked text exists in the subagent transcript, e.g. /root/.openclaw/agents/main/sessions/4acca8c5-cef0-4390-b33f-fb977d4ca104.jsonl:

line 46 toolResult exec:
/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:181:  PluginControlUiDescriptorSchema,
/root/openclaw/src/gateway/protocol/schema/protocol-schemas.ts:411:  PluginControlUiDescriptor: PluginControlUiDescriptorSchema,
/root/openclaw/src/gateway/protocol/schema/types.ts:137:export type PluginControlUiDescriptor = SchemaType<"PluginControlUiDescriptor">;
/root/openclaw/src/gateway/protocol/schema/plugins.ts:6:export const PluginControlUiDescriptorSchema = Type.Object(
...

The parent then received internal completion events as user messages:

[Inter-session message] sourceSession=agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24 sourceChannel=webchat sourceTool=subagent_announce isUser=false
[Internal task completion event]
source: subagent
...

Related diagnostics from gateway logs

Around the same window the gateway also reported event-loop starvation and context overflows in the child runs:

[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu ... active=3 ...
[fetch-timeout] ... likely event-loop starvation ... Telegram getMe
[context-overflow-diag] sessionKey=agent:main:subagent:49041306-beb7-4afb-9cd8-9803f7fe8e95 ... Context overflow: estimated context size exceeds safe threshold during tool loop.
[context-overflow-diag] sessionKey=agent:main:subagent:66103870-5db8-4df7-8178-354c87a99b24 ... Context overflow: estimated context size exceeds safe threshold during tool loop.

Expected behavior

  • Parent progress acknowledgement should not be delivered twice for one Telegram user message.
  • Subagent completion announce should deliver a concise final child result or a controlled failure summary.
  • Raw tool results/code dumps from child transcripts must not be routed to Telegram.
  • Internal completion event envelopes should remain internal to the parent session and should not cause user-visible channel spam.

Actual behavior

  • Duplicate parent progress acknowledgement was visible in Telegram.
  • Raw child exec/read tool outputs were surfaced in the Telegram chat.
  • The leaked content was large enough to look like source-code dumps, not an intentional final report.

Notes

This appears related to the existing subagent announce/tool-output leak class, but reproduced on 2026.5.7 with sessions_spawn(mode="run"), Telegram DM, child context overflows, and event-loop delay. Existing related issues include #74073 and #25592; this report adds a fresh 2026.5.7 Telegram/subagent reproduction with concrete session keys and timestamps.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Parent progress acknowledgement should not be delivered twice for one Telegram user message.
  • Subagent completion announce should deliver a concise final child result or a controlled failure summary.
  • Raw tool results/code dumps from child transcripts must not be routed to Telegram.
  • Internal completion event envelopes should remain internal to the parent session and should not cause user-visible channel spam.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING