openclaw - 💡(How to fix) Fix Sub-agent inter-session messages duplicated 2-3 times via sessions_send [2 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#73550Fetched 2026-04-29 06:18:23
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×2

When using sessions_send to communicate with persistent sub-agents, the sub-agent's reply gets delivered multiple times (2-3 times) to the parent session's conversation. This causes severe clutter, especially in webchat UI.

Root Cause

When using sessions_send to communicate with persistent sub-agents, the sub-agent's reply gets delivered multiple times (2-3 times) to the parent session's conversation. This causes severe clutter, especially in webchat UI.

RAW_BUFFERClick to expand / collapse

Sub-agent inter-session messages duplicated multiple times

Description

When using sessions_send to communicate with persistent sub-agents, the sub-agent's reply gets delivered multiple times (2-3 times) to the parent session's conversation. This causes severe clutter, especially in webchat UI.

Steps to Reproduce

  1. Create a persistent sub-agent session
  2. From the main session, call sessions_send to the sub-agent with a simple message
  3. Observe the conversation: the sub-agent's reply appears 2-3 times as inter-session messages

Expected Behavior

Sub-agent replies should appear only once in the parent session's conversation flow.

Actual Behavior

The same reply appears 2-3 times. Additionally, the delivery.mode: "announce" on sub-agent sessions causes the reply to be pushed to channels, which may trigger another round of inter-session messages if the sub-agent responds to the announce notification (creating a feedback loop).

Environment

  • OpenClaw: 2026.4.24
  • Sub-agent type: persistent session via sessions_spawn (runtime=subagent, mode=session)
  • streamTo: "parent" configured

Possible Causes

  1. Inter-session message delivery has retry/redundancy logic that fires multiple times
  2. delivery.mode: "announce" on sub-agent sessions creates a secondary delivery path that overlaps with the sessions_send reply path
  3. Sub-agent receiving its own announce notification and responding creates a feedback loop

Suggested Fix

  1. Deduplicate inter-session messages before injecting into conversation
  2. Allow disabling delivery.mode: "announce" for sub-agent sessions (or default to "none")
  3. Prevent sub-agents from receiving their own announce notifications as inter-session messages

extent analysis

TL;DR

Disable delivery.mode: "announce" for sub-agent sessions to prevent duplicate inter-session messages.

Guidance

  • Investigate the inter-session message delivery logic to identify potential retry or redundancy mechanisms that may be causing duplicates.
  • Verify that disabling delivery.mode: "announce" for sub-agent sessions resolves the issue without introducing other problems.
  • Consider implementing deduplication of inter-session messages before injecting them into the conversation flow.
  • Review the sub-agent's response to announce notifications to prevent feedback loops.

Example

No code snippet is provided as the issue does not contain specific code references.

Notes

The suggested fix may not address all possible causes of the issue, and further investigation may be necessary to identify the root cause.

Recommendation

Apply workaround: Disable delivery.mode: "announce" for sub-agent sessions, as this is a straightforward change that may resolve the issue without introducing significant complexity.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Sub-agent inter-session messages duplicated 2-3 times via sessions_send [2 comments, 2 participants]