openclaw - 💡(How to fix) Fix [Bug]: Inbound media staged to global ~/.openclaw/media/inbound/ instead of agent workspace path, making files unreachable in sandboxed agents [1 comments, 2 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#63285Fetched 2026-04-09 07:55:52
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1

When a file is uploaded to Slack and received by a sandboxed agent, the inbound media staging pipeline writes the file to the global ~/.openclaw/media/inbound/ path. The path injected into the agent's prompt also points to this global location. For sandboxed agents, the global host path is outside the sandbox mount and is unreachable — the agent cannot access, read, or ingest the file.

The expected behavior is that inbound media for an agent with a configured workspace should be staged to <workspace_root>/media/inbound/, which is bind-mounted into the sandbox and accessible.

Related prior issues (same root cause, different channel):

  • #43378 — same bug reported for Telegram, marked closed — fix appears not to have been extended to Slack
  • #32362 — same bug for Telegram xlsx attachments, open/stale

Error Message

unreachable. The agent receives no error; it simply cannot find the file.

Root Cause

Related prior issues (same root cause, different channel):

  • #43378 — same bug reported for Telegram, marked closed — fix appears not to have been extended to Slack
  • #32362 — same bug for Telegram xlsx attachments, open/stale

Fix Action

Workaround

None for sandboxed agents. Files must currently be shared via a path accessible inside the sandbox (e.g. Google Drive synced to workspace).

Non-sandboxed agents: unaffected — global path is host-accessible.

Code Example

<workspace_root>/media/inbound/<filename>

---

/root/.openclaw/media/inbound/76e093ba...pdf   ← global host path (confirmed written)

---

/root/.openclaw/media/inbound/76e093ba...pdf   ← inaccessible from inside sandbox

---

/root/workspace-sales/media/inbound/   ← empty; never received a file since provisioning (2026-04-07)

---

/root/workspace-sales → /workspace   (bind mount, rw)

---

{
  "id": "sales",
  "workspace": "/root/workspace-sales",
  "sandbox": {
    "mode": "all",
    "scope": "agent",
    "workspaceAccess": "rw",
    "docker": {
      "image": "openclaw-sandbox-sales:bookworm-slim",
      "network": "openclaw-sales-sandbox"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When a file is uploaded to Slack and received by a sandboxed agent, the inbound media staging pipeline writes the file to the global ~/.openclaw/media/inbound/ path. The path injected into the agent's prompt also points to this global location. For sandboxed agents, the global host path is outside the sandbox mount and is unreachable — the agent cannot access, read, or ingest the file.

The expected behavior is that inbound media for an agent with a configured workspace should be staged to <workspace_root>/media/inbound/, which is bind-mounted into the sandbox and accessible.

Related prior issues (same root cause, different channel):

  • #43378 — same bug reported for Telegram, marked closed — fix appears not to have been extended to Slack
  • #32362 — same bug for Telegram xlsx attachments, open/stale

Steps to reproduce

  1. Deploy a sandboxed agent with a workspace configured (e.g. workspace: /root/workspace-sales, Docker sandbox mode: all, bind-mount workspace-root → /workspace)
  2. Upload any file (PDF tested) to the Slack channel bound to the sandboxed agent
  3. Observe: agent reports the file is not found or not accessible
  4. Check ~/.openclaw/media/inbound/ — the file is present at the global path
  5. Check <workspace_root>/media/inbound/ — directory is empty; file was never written there

Expected behavior

Inbound media for a sandboxed agent with a configured workspace root should be staged to:

<workspace_root>/media/inbound/<filename>

The path injected into the agent's prompt should match this workspace-relative path, which resolves to /workspace/media/inbound/<filename> inside the sandbox.

Actual behavior

File is staged to:

/root/.openclaw/media/inbound/76e093ba...pdf   ← global host path (confirmed written)

Path injected into agent prompt:

/root/.openclaw/media/inbound/76e093ba...pdf   ← inaccessible from inside sandbox

Workspace media directory:

/root/workspace-sales/media/inbound/   ← empty; never received a file since provisioning (2026-04-07)

Agent response: "I don't see the GenAIPI-Leadership-Deck.pdf attached in the workspace."

Mount evidence (from /proc/1/mountinfo inside sandbox)

/root/workspace-sales → /workspace   (bind mount, rw)

The global ~/.openclaw/media/inbound/ path has no corresponding mount inside the sandbox. Files written there are invisible to the sandboxed agent process.

OpenClaw version

2026.4.2 (d74a122)

Operating system

Linux 6.8.0-100-generic x86_64 (Ubuntu)

Install method

npm global

Agent configuration (affected agent)

{
  "id": "sales",
  "workspace": "/root/workspace-sales",
  "sandbox": {
    "mode": "all",
    "scope": "agent",
    "workspaceAccess": "rw",
    "docker": {
      "image": "openclaw-sandbox-sales:bookworm-slim",
      "network": "openclaw-sales-sandbox"
    }
  }
}

Impact and severity

High — All inbound file uploads (any type) to any sandboxed agent are silently unreachable. The agent receives no error; it simply cannot find the file.

ScenarioStatus
All inbound files for sandboxed agents100% affected [Confirmed]
Non-sandboxed agents (e.g. Main Jarvis)Likely unaffected — global path is accessible [Likely]
All file types (PDF, image, txt, etc.)Likely all affected [Likely]

Evidence classification

Confirmed facts

  • Global path ~/.openclaw/media/inbound/ receives the file — physically present there
  • Sandbox bind-mount: /root/workspace-sales → /workspace (rw) — confirmed from /proc/1/mountinfo
  • Path injected into agent prompt points to global host path, not workspace path
  • <workspace_root>/media/inbound/ has been empty since agent provisioning (2026-04-07)
  • Agent could not access the uploaded PDF; reported file not found in #sales Slack channel (2026-04-08 ~05:48 UTC)

Likely contributing factors

  • Staging pipeline uses a hardcoded or globally-resolved path rather than resolving <agent.workspace>/media/inbound/ when the receiving agent has a workspace configured
  • The prompt path injection step runs from the same global-path value without a workspace-relative translation step

Unknowns / needs verification

  • Whether the bug is in the write step (file never written to workspace path), the path injection step (file written correctly but wrong path injected), or both
  • Whether agents with a workspace configured but not sandboxed are also silently affected
  • Whether files:read Slack scope is present on the bot token (separate potential issue)

Suspected root cause

The inbound media staging pipeline resolves the destination path globally (~/.openclaw/media/inbound/) without checking whether the target agent has a workspace configured. When a workspace is present, both the staging write and the prompt-injected path should resolve to <agent.workspace>/media/inbound/.

Note: This is a path-resolution bug in the staging pipeline, not a sandbox bind-mount design gap. The fix should be in staging path resolution, not in adding additional bind-mounts.

Workaround

None for sandboxed agents. Files must currently be shared via a path accessible inside the sandbox (e.g. Google Drive synced to workspace).

Non-sandboxed agents: unaffected — global path is host-accessible.

Recent changes

  • Sandboxed sales agent provisioned 2026-04-07 (new deployment, first file upload attempt)
  • No OpenClaw version change immediately prior to discovery

Logs, screenshots, and evidence

  • Mount proof from /proc/1/mountinfo inside sandbox: /root/workspace-sales → /workspace (bind mount, rw)
  • Staged file location: /root/.openclaw/media/inbound/76e093ba...pdf (present on host)
  • Workspace inbound dir: /root/workspace-sales/media/inbound/ (empty since 2026-04-07)
  • Agent response logged in #sales Slack channel at approx. 2026-04-08 05:48 UTC

Additional information

The sandboxed Sales Jarvis agent was asked to ingest GenAIPI-Leadership-Deck.pdf uploaded to the #sales Slack channel. The agent responded that the file was not present in the workspace. Investigation confirmed the staging path mismatch described above.

See also: #43378 (same bug, Telegram, closed), #32362 (same bug, Telegram xlsx, open/stale).

extent analysis

TL;DR

The inbound media staging pipeline should be updated to resolve the destination path relative to the agent's workspace when configured, instead of using a global path.

Guidance

  • Verify that the workspace configuration is correctly set for the affected agent and that the bind-mount is properly established.
  • Check the staging pipeline code to identify where the global path is being used and update it to use the workspace-relative path when a workspace is configured.
  • Test the updated staging pipeline with a sandboxed agent to ensure that files are correctly staged to the workspace path and that the agent can access them.
  • Consider adding logging or debugging statements to the staging pipeline to help identify any issues with path resolution.

Example

No code example is provided as the issue does not include specific code snippets, but the fix would involve updating the staging pipeline to use the workspace-relative path, e.g., <agent.workspace>/media/inbound/.

Notes

The fix should be applied to the staging pipeline, and not by adding additional bind-mounts. The issue is specific to sandboxed agents with a configured workspace, and non-sandboxed agents are likely unaffected.

Recommendation

Apply a workaround by updating the staging pipeline to use the workspace-relative path when a workspace is configured, as this is a path-resolution bug in the staging pipeline. This fix should resolve the issue for sandboxed agents and prevent similar issues in the future.

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

Inbound media for a sandboxed agent with a configured workspace root should be staged to:

<workspace_root>/media/inbound/<filename>

The path injected into the agent's prompt should match this workspace-relative path, which resolves to /workspace/media/inbound/<filename> inside the sandbox.

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]: Inbound media staged to global ~/.openclaw/media/inbound/ instead of agent workspace path, making files unreachable in sandboxed agents [1 comments, 2 participants]