openclaw - 💡(How to fix) Fix Sub-agent completion announces don't route to originating Telegram session [1 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#57385Fetched 2026-04-08 01:50:20
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
  • OpenClaw version: latest (as of 2026-03-29)
  • Channel: Telegram (direct message)
  • Sub-agent runtime: subagent
  • This was observed multiple times in the same session — two separate sub-agent spawns both announced to webchat instead of Telegram.

Root Cause

  • OpenClaw version: latest (as of 2026-03-29)
  • Channel: Telegram (direct message)
  • Sub-agent runtime: subagent
  • This was observed multiple times in the same session — two separate sub-agent spawns both announced to webchat instead of Telegram.
RAW_BUFFERClick to expand / collapse

Bug

When a sub-agent is spawned from a main session that's actively receiving messages via Telegram, the completion announce routes to the webchat/desktop surface instead of the Telegram channel where the conversation is happening.

Expected behavior

Sub-agent completion events should announce back to the same channel/surface where the parent session is actively conversing. If the user is talking on Telegram, the announce should arrive on Telegram.

Actual behavior

Announces go to the webchat session (desktop), not the Telegram session that originated the sub-agent spawn. The user on Telegram never sees the completion — the main agent has to manually relay the results.

Reproduction

  1. Start a conversation on Telegram with the main agent
  2. Main agent spawns a sub-agent via sessions_spawn (e.g., runtime=subagent, mode=run)
  3. Sub-agent completes successfully
  4. Completion announce arrives on webchat/desktop, NOT on Telegram

Context

  • OpenClaw version: latest (as of 2026-03-29)
  • Channel: Telegram (direct message)
  • Sub-agent runtime: subagent
  • This was observed multiple times in the same session — two separate sub-agent spawns both announced to webchat instead of Telegram.

Impact

Medium — user misses completion events and has to ask "did it finish?" The main agent can work around it by relaying manually, but it breaks the expected flow.

extent analysis

Fix Plan

The fix involves modifying the completion announce route to use the parent session's channel instead of defaulting to the webchat/desktop surface.

Steps:

  • Update the sessions_spawn function to pass the parent session's channel to the sub-agent.
  • Modify the sub-agent's completion announce logic to use the provided channel.

Example Code:

# In sessions_spawn function
subagent_channel = session.channel  # Get the parent session's channel
spawn_data = {
    'runtime': 'subagent',
    'mode': 'run',
    'channel': subagent_channel  # Pass the channel to the sub-agent
}

# In sub-agent's completion announce logic
def announce_completion(result):
    channel = self.channel  # Use the provided channel
    if channel == 'telegram':
        # Send completion announce to Telegram
        telegram_send_message(result)
    else:
        # Handle other channels
        pass

Verification

To verify the fix, follow the reproduction steps and check that the completion announce arrives on the Telegram channel.

Extra Tips

  • Ensure that the sessions_spawn function is updated to pass the parent session's channel to the sub-agent.
  • Test the fix with different channels and sub-agent runtimes to ensure it works as expected.

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

Sub-agent completion events should announce back to the same channel/surface where the parent session is actively conversing. If the user is talking on Telegram, the announce should arrive on Telegram.

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 completion announces don't route to originating Telegram session [1 participants]