openclaw - 💡(How to fix) Fix [Bug]: # `sessions_send` duplicates waited A2A replies via inline return + later inter-session announce`

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…

In normal A2A usage (not parent-owned sub-agent flow), sessions_send can deliver the same logical reply twice to the requester side:

  1. first as the synchronous toolResult.reply
  2. then again as a later [Inter-session message] ... sourceTool=sessions_send

I reproduced this in webchat between:

  • agent:task-manager:main
  • agent:data-analyst:main

I also manually removed persisted deliveryContext from both sessions before re-testing, and the duplicate still occurred.

So this does not appear to require deliveryContext. It looks more like an overlap between:

  • the waited sessions_send inline reply path
  • the later A2A / announce / bridge delivery path

Root Cause

In normal A2A usage (not parent-owned sub-agent flow), sessions_send can deliver the same logical reply twice to the requester side:

  1. first as the synchronous toolResult.reply
  2. then again as a later [Inter-session message] ... sourceTool=sessions_send

I reproduced this in webchat between:

  • agent:task-manager:main
  • agent:data-analyst:main

I also manually removed persisted deliveryContext from both sessions before re-testing, and the duplicate still occurred.

So this does not appear to require deliveryContext. It looks more like an overlap between:

  • the waited sessions_send inline reply path
  • the later A2A / announce / bridge delivery path

Code Example

sessions_send({
  "sessionKey": "agent:data-analyst:main",
  "message": "请只回复:ACK-ONE-LINE",
  "timeoutSeconds": 120
})

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

In normal A2A usage (not parent-owned sub-agent flow), sessions_send can deliver the same logical reply twice to the requester side:

  1. first as the synchronous toolResult.reply
  2. then again as a later [Inter-session message] ... sourceTool=sessions_send

I reproduced this in webchat between:

  • agent:task-manager:main
  • agent:data-analyst:main

I also manually removed persisted deliveryContext from both sessions before re-testing, and the duplicate still occurred.

So this does not appear to require deliveryContext. It looks more like an overlap between:

  • the waited sessions_send inline reply path
  • the later A2A / announce / bridge delivery path

Steps to reproduce

  1. Use two normal cross-agent sessions, for example:

    • requester: agent:task-manager:main
    • target: agent:data-analyst:main
  2. Ensure this is a normal A2A send, not a parent-owned spawned sub-agent case.

  3. Remove persisted deliveryContext from both session rows in:

    • /home/node/.openclaw/agents/task-manager/sessions/sessions.json
    • /home/node/.openclaw/agents/data-analyst/sessions/sessions.json
  4. Call:

sessions_send({
  "sessionKey": "agent:data-analyst:main",
  "message": "请只回复:ACK-ONE-LINE",
  "timeoutSeconds": 120
})
  1. Observe:
    • tool result returns reply: "ACK-ONE-LINE"
    • later requester receives another [Inter-session message] ... ACK-ONE-LINE

Expected behavior

For waited sessions_send, the requester should see only one parent-visible result path.

If the tool already returns reply, the same reply should not be reinjected later as an inter-session message.

Actual behavior

The same reply is delivered twice:

  • once as toolResult.reply
  • once again as a later inter-session routed message

OpenClaw version

2026.5.7

Operating system

Linux 5.15.0-100-generic (x64)

Install method

docker

Model

gpt5.4/deepseek-v4-pro

Provider / routing chain

webchat (OpenClaw Control UI) -> agent:task-manager:main -> sessions_send -> agent:data-analyst:main -> inter-session announce/bridge

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

I inspected the local compiled runtime and the current implementation appears to:

  1. wait for the target run to finish
  2. read the updated reply
  3. return that reply inline
  4. then still call startA2AFlow(reply)
  5. and that A2A flow later performs an announce/send step unless skipped

Relevant local file inspected:

  • /app/dist/openclaw-tools-0ftkmYS3.js

Notable areas:

  • waited path returns reply and still starts A2A flow: around 7818–7865
  • skip logic appears limited to special parent/sub-agent cases: around 7774–7797
  • A2A flow announce/send path: around 7448–7557
  • announce prompt says non-skip output will be posted: around 7387–7396

This makes the issue look like a real code-path overlap rather than a UI-only duplication.

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

For waited sessions_send, the requester should see only one parent-visible result path.

If the tool already returns reply, the same reply should not be reinjected later as an inter-session message.

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 [Bug]: # `sessions_send` duplicates waited A2A replies via inline return + later inter-session announce`