openclaw - 💡(How to fix) Fix Sandboxed agents cannot reliably consume downloaded files because host workspace paths are returned instead of /workspace paths [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#59063Fetched 2026-04-08 02:29:14
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

  • Sandbox FS error (ENOENT)

Root Cause

This currently creates a class of failures where:

  • download succeeds
  • follow-up read/image/pdf/edit steps fail
  • agents appear flaky even though the actual issue is path translation between host and sandbox
RAW_BUFFERClick to expand / collapse

For sandboxed agents, files downloaded by tools may be saved to host paths such as:

  • /home/jihua/.openclaw/workspaces/workspace-<agent>/...
  • /tmp/openclaw/...
  • /home/jihua/.openclaw/media/inbound/...

However, subsequent tool calls running inside the agent sandbox appear to resolve files relative to /workspace and/or reject host paths as escaping the sandbox root.

As a result, a file may be downloaded successfully, but later tool calls fail with errors like:

  • ENOENT
  • Path escapes sandbox root
  • file exists on host, but is not readable from sandboxed tool calls

This has been observed across multiple agents, including:

  • zhengzitong
  • huhehada

Expected behavior

When a sandboxed agent downloads a file, the returned path should be directly usable by later sandboxed tool calls.

For example, one of these should happen consistently:

  1. return a sandbox-visible path such as /workspace/...
  2. include both:
    • host path
    • sandbox path
  3. normalize all tool file outputs for sandboxed agents into the current agent workspace view

Why this matters

This currently creates a class of failures where:

  • download succeeds
  • follow-up read/image/pdf/edit steps fail
  • agents appear flaky even though the actual issue is path translation between host and sandbox

Notes

This looks like a host-path vs sandbox-path mapping inconsistency rather than a download failure itself.

Observed related errors include:

  • Path escapes sandbox root
  • Sandbox FS error (ENOENT)

extent analysis

TL;DR

The issue can be resolved by ensuring that the paths returned by the sandboxed agent are directly usable by later sandboxed tool calls, potentially by normalizing all tool file outputs to the current agent workspace view.

Guidance

  • Verify that the issue is indeed caused by the inconsistency between host paths and sandbox paths by checking the file paths returned by the sandboxed agent and the paths expected by the subsequent tool calls.
  • Consider modifying the sandboxed agent to return sandbox-visible paths, such as /workspace/..., instead of host paths.
  • Investigate the possibility of including both host path and sandbox path in the output, to allow for flexibility in handling file paths.
  • Review the error messages, such as Path escapes sandbox root and Sandbox FS error (ENOENT), to understand the specific points of failure and adjust the path handling accordingly.

Example

No specific code snippet can be provided without more context, but an example of normalizing paths to the current agent workspace view might involve using a function to translate host paths to sandbox paths.

Notes

The solution may require changes to the sandboxed agent's file handling logic, and careful consideration of the security implications of allowing sandboxed tool calls to access files outside the sandbox root.

Recommendation

Apply a workaround to normalize all tool file outputs for sandboxed agents into the current agent workspace view, as this approach seems to address the root cause of the issue and provides a consistent solution across different agents.

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

When a sandboxed agent downloads a file, the returned path should be directly usable by later sandboxed tool calls.

For example, one of these should happen consistently:

  1. return a sandbox-visible path such as /workspace/...
  2. include both:
    • host path
    • sandbox path
  3. normalize all tool file outputs for sandboxed agents into the current agent workspace view

Still need to ship something?

×6

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

Back to top recommendations

TRENDING