openclaw - ✅(Solved) Fix [Bug]: session_send does not work for sandboxed agents [1 pull requests, 1 comments, 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#59256Fetched 2026-04-08 02:26:51
View on GitHub
Comments
1
Participants
1
Timeline
11
Reactions
0
Participants
Timeline (top)
referenced ×6labeled ×2commented ×1cross-referenced ×1

After enabling sandbox mode for all my agents except the main agent, my agents are no longer able to send messages to each other. sessions_send does not work (times out).

The non-sandbox agent (main) does not have this issue.

This suggests a sandbox-specific regression in session cross-session routing.

Root Cause

After enabling sandbox mode for all my agents except the main agent, my agents are no longer able to send messages to each other. sessions_send does not work (times out).

The non-sandbox agent (main) does not have this issue.

This suggests a sandbox-specific regression in session cross-session routing.

Fix Action

Fixed

PR fix notes

PR #59477: fix(sessions_send): allow cross-agent messaging for sandboxed agents with a2a enabled

Description (problem / solution / changelog)

Fixes #59256

Problem

Sandboxed agents cannot send messages to other agents' sessions via sessions_send, even when tools.agentToAgent.enabled = true and the allow list permits it. The error is "Sandboxed sessions_send label lookup is limited to this agent".

Root Cause

In src/agents/tools/sessions-send-tool.ts, the restrictToSpawned check blocked cross-agent messaging before the a2aPolicy check could run. Additionally, the spawnedBy filter was always applied for sandboxed agents, preventing lookup of sessions owned by other agents.

Fix

  1. Move a2aPolicy check before the restrictToSpawned guard, so sandboxed agents can send to other agents when properly configured
  2. Don't apply spawnedBy filter for cross-agent a2a messaging, allowing target agent's sessions to be visible during lookup

Test Plan

  • Existing sessions-resolution tests pass (16/16)
  • Existing sessions-list-tool tests pass (3/3)
  • Manual testing: configure two sandboxed agents with a2a enabled, verify session_send works

Changed files

  • src/agents/tools/sessions-send-tool.ts (modified, +15/-12)
  • src/infra/exec-approvals-persist.test.ts (added, +142/-0)
  • src/infra/exec-approvals.ts (modified, +30/-3)

Code Example

"sandbox": {
  "mode": "all"
}

---

"agentToAgent": {
      "enabled": true,
      "allow": [
        "agent-id",
        "agent-id-2",
        "agent-id-3"
      ]
    }

---

"sandbox": {
    "tools": {
        "allow": [
            "group:fs",
            "group:memory",
            "sessions_list",
            "sessions_history",
            "sessions_send"
        ]
    }
}

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After enabling sandbox mode for all my agents except the main agent, my agents are no longer able to send messages to each other. sessions_send does not work (times out).

The non-sandbox agent (main) does not have this issue.

This suggests a sandbox-specific regression in session cross-session routing.

Steps to reproduce

  • setup multiple agents.
  • enable session_list, session_send tools
  • enable sandbox mode for agents:
"sandbox": {
  "mode": "all"
}
  • enable agentToAgent tool with proper "allow" list.
"agentToAgent": {
      "enabled": true,
      "allow": [
        "agent-id",
        "agent-id-2",
        "agent-id-3"
      ]
    }

session_list, session_send tools are enabled for all agents. agents -> list -> tools:

"sandbox": {
    "tools": {
        "allow": [
            "group:fs",
            "group:memory",
            "sessions_list",
            "sessions_history",
            "sessions_send"
        ]
    }
}

Expected behavior

agents should be able to retrieve session lists and send messages via session_send

Actual behavior

session_send times out when using a session from session_list

OpenClaw version

2026.4.1

Operating system

Ubuntu 24.04

Install method

npm global

Model

gpt 5.4

Provider / routing chain

openclaw -> tailscale -> gpt 5.4

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

My agents can't communicate with each other so it impacts their ability to do their job.

Additional information

No response

extent analysis

TL;DR

Disable sandbox mode for the affected agents or adjust the sandbox configuration to allow cross-session routing.

Guidance

  • Verify that the agentToAgent tool is properly configured and enabled for all agents involved in the communication.
  • Check the sandbox mode configuration to ensure that it is not restricting the sessions_send tool or cross-session routing.
  • Test the sessions_send tool with a different configuration, such as disabling sandbox mode for one of the affected agents, to isolate the issue.
  • Review the OpenClaw documentation for any specific requirements or restrictions related to sandbox mode and cross-session routing.

Example

No specific code example is provided, as the issue is related to configuration and setup.

Notes

The provided information suggests a sandbox-specific regression, but without more detailed logs or error messages, it is difficult to determine the exact cause of the issue.

Recommendation

Apply workaround: Adjust the sandbox configuration to allow cross-session routing, as disabling sandbox mode for all agents may not be a viable solution. This workaround can help mitigate the issue while further investigation is conducted.

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

agents should be able to retrieve session lists and send messages via session_send

Still need to ship something?

×6

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

Back to top recommendations

TRENDING