openclaw - 💡(How to fix) Fix [Feature]: Cross-session task notification — allow agents to notify other sessions on completion [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#59375Fetched 2026-04-08 02:24:33
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
  • This is essential for multi-agent architectures where agents are deployed as separate OpenClaw instances across Discord channels
  • The pattern is: dispatcher agent creates a task → team agents execute → result flows back to dispatcher
  • Without this, the human must manually check each task channel for completion, defeating the purpose of delegation

Root Cause

  • This is essential for multi-agent architectures where agents are deployed as separate OpenClaw instances across Discord channels
  • The pattern is: dispatcher agent creates a task → team agents execute → result flows back to dispatcher
  • Without this, the human must manually check each task channel for completion, defeating the purpose of delegation

Fix Action

Fix / Workaround

  • luna-agent dispatches a task to a team channel where leader-agent coordinates dev/pm/tester agents

  • When the team finishes, leader-agent needs to notify luna-agent back in the original product discussion channel

  • Currently there is no way to do this — each channel is an isolated session

  • This is essential for multi-agent architectures where agents are deployed as separate OpenClaw instances across Discord channels

  • The pattern is: dispatcher agent creates a task → team agents execute → result flows back to dispatcher

  • Without this, the human must manually check each task channel for completion, defeating the purpose of delegation

RAW_BUFFERClick to expand / collapse

Problem

In a multi-agent architecture where different agents run in separate Discord channels (each with their own OpenClaw session), there is no built-in mechanism for one agent to notify another agent's session when a task is complete.

Real-world scenario

  • luna-agent dispatches a task to a team channel where leader-agent coordinates dev/pm/tester agents
  • When the team finishes, leader-agent needs to notify luna-agent back in the original product discussion channel
  • Currently there is no way to do this — each channel is an isolated session

Current State

  • sessions_send exists as a tool but requires knowing the exact target session key
  • There's no discovery mechanism ("find the session for channel X")
  • There's no event-based notification ("when session Y ends, tell session X")
  • Subagent completion events (subagent_announce) work within the same agent instance but not across separate agent instances

Proposed Solution

Option A: Cross-agent sessions_send with channel-based addressing — Allow agents to send messages to other agents by channel identifier rather than session key. E.g., sessions_send(channel: 'discord:#product-chat', agent: 'luna-agent', message: 'Task complete: ...')

Option B: Webhook/callback on session events — When a session ends or a specific condition is met, fire a webhook or inject a message into a target session. Could be configured per-channel or per-task.

Option C: Shared task registry — A lightweight task tracking mechanism that agents can write to and poll from, independent of session boundaries. Task created → task completed → originating session gets notified.

Context

  • This is essential for multi-agent architectures where agents are deployed as separate OpenClaw instances across Discord channels
  • The pattern is: dispatcher agent creates a task → team agents execute → result flows back to dispatcher
  • Without this, the human must manually check each task channel for completion, defeating the purpose of delegation

Environment

  • OpenClaw: latest (running from source)
  • Platform: Discord (multi-bot, multi-channel)
  • Multiple independent OpenClaw agent instances

extent analysis

TL;DR

Implementing a cross-agent communication mechanism, such as Option A's channel-based addressing for sessions_send, is likely the most straightforward fix to enable notification between agents in separate Discord channels.

Guidance

  • Explore Option A by modifying the sessions_send tool to accept channel identifiers instead of session keys, allowing agents to send messages to other agents based on the channel they are operating in.
  • Consider the feasibility of Option B, which involves setting up webhooks or callbacks on session events, as this could provide a more event-driven approach to cross-agent notification.
  • Evaluate the suitability of Option C, a shared task registry, as a potential solution for tracking task completion across session boundaries, ensuring it aligns with the existing multi-agent architecture.
  • Assess the impact of each proposed solution on the existing architecture, particularly in terms of scalability, security, and ease of implementation.

Example

# Hypothetical example of sessions_send with channel-based addressing
def sessions_send(channel, agent, message):
    # Logic to find the session key associated with the given channel and agent
    session_key = find_session_key(channel, agent)
    # Send the message using the session key
    send_message(session_key, message)

# Usage
sessions_send('discord:#product-chat', 'luna-agent', 'Task complete: ...')

Notes

The choice of solution depends on the specific requirements and constraints of the multi-agent architecture, including considerations for security, performance, and maintainability. Each option may have different implications for the system's overall design and operation.

Recommendation

Apply a workaround such as Option A, as it seems to be the most direct approach to enabling cross-agent notification based on the provided context. This recommendation is based on the assumption that a straightforward, channel-based addressing mechanism can be effectively integrated into the existing sessions_send tool.

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