openclaw - 💡(How to fix) Fix Sandbox mode: cron tool not injected into sandboxed sessions (group chat) [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#54338Fetched 2026-04-08 01:28:48
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

When sandbox.mode: "all" is enabled for an agent, the cron tool is not available (not injected into the model's function/tool list) in sandboxed sessions, even when cron is explicitly added to the sandbox tool policy allow list.

Root Cause

When sandbox.mode: "all" is enabled for an agent, the cron tool is not available (not injected into the model's function/tool list) in sandboxed sessions, even when cron is explicitly added to the sandbox tool policy allow list.

Fix Action

Workaround

Setting sandbox.mode: "off" makes cron available in all sessions, but loses filesystem isolation.

Code Example

{
  id: "laoma",
  sandbox: {
    mode: "all",
    backend: "docker",
    scope: "agent",
    workspaceAccess: "rw",
    docker: { image: "openclaw-sandbox:bookworm-slim" }
  },
  tools: {
    sandbox: {
      tools: {
        allow: ["group:runtime", "group:fs", "group:sessions", "group:memory", "group:automation", "group:messaging", "image"],
        deny: ["gateway"]
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Description

When sandbox.mode: "all" is enabled for an agent, the cron tool is not available (not injected into the model's function/tool list) in sandboxed sessions, even when cron is explicitly added to the sandbox tool policy allow list.

Steps to Reproduce

  1. Configure an agent with sandbox enabled:
{
  id: "laoma",
  sandbox: {
    mode: "all",
    backend: "docker",
    scope: "agent",
    workspaceAccess: "rw",
    docker: { image: "openclaw-sandbox:bookworm-slim" }
  },
  tools: {
    sandbox: {
      tools: {
        allow: ["group:runtime", "group:fs", "group:sessions", "group:memory", "group:automation", "group:messaging", "image"],
        deny: ["gateway"]
      }
    }
  }
}
  1. openclaw sandbox explain --agent laoma confirms cron is in the allow list and NOT in the deny list
  2. Agent receives a message in a group chat session (sandboxed)
  3. Agent does NOT have cron in its available tools — it tries to use exec to find openclaw cron CLI instead
  4. The same agent in a private DM session (also sandboxed, same container, same scope) can use the cron tool successfully

Expected Behavior

cron tool should be available (injected as a function definition in the API call) in all sandboxed sessions when it's in the sandbox tool policy allow list.

Actual Behavior

  • cron tool is NOT injected into sandboxed group chat sessions
  • cron tool IS available in sandboxed DM sessions (same agent, same container)
  • sandbox explain shows the correct policy (cron allowed), but the tool is not actually available to the model

Environment

  • OpenClaw version: 2026.3.23-1
  • Node.js: v24.13.0
  • OS: Linux 5.15.30-2-pve (x64)
  • Sandbox backend: Docker
  • Sandbox scope: agent
  • Channel: custom wechat-ipad plugin (ChannelPlugin)

Workaround

Setting sandbox.mode: "off" makes cron available in all sessions, but loses filesystem isolation.

Notes

  • The cron tool code appears to be in pi-embedded bundle, not in gateway-cli bundle — this might be related
  • group:automation (which includes cron) in the allow list doesn't help
  • Deleting the sandbox container and recreating sessions doesn't help
  • The issue might be specific to group/channel sessions vs DM sessions in sandbox mode

extent analysis

Fix Plan

To fix the issue of cron tool not being available in sandboxed group chat sessions, follow these steps:

  • Update the sandbox configuration to include cron in the allow list for group chat sessions.
  • Modify the tools configuration to include cron in the group:automation allow list.
  • Ensure the pi-embedded bundle is properly loaded in the sandbox environment.

Example code changes:

{
  id: "laoma",
  sandbox: {
    mode: "all",
    backend: "docker",
    scope: "agent",
    workspaceAccess: "rw",
    docker: { image: "openclaw-sandbox:bookworm-slim" }
  },
  tools: {
    sandbox: {
      tools: {
        allow: [
          "group:runtime",
          "group:fs",
          "group:sessions",
          "group:memory",
          "group:automation",
          "group:messaging",
          "image",
          "cron" // Add cron to the allow list
        ],
        deny: ["gateway"]
      }
    }
  }
}

Verification

To verify the fix, follow these steps:

  • Run openclaw sandbox explain --agent laoma to confirm cron is in the allow list and not in the deny list.
  • Test the agent in a group chat session (sandboxed) and verify that cron is available.
  • Test the agent in a private DM session (sandboxed) and verify that cron is still available.

Extra Tips

  • Ensure the pi-embedded bundle is properly loaded in the sandbox environment.
  • If issues persist, try setting sandbox.mode: "off" to isolate the problem.
  • Verify that the group:automation allow list is properly configured to include cron.

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