← Back to PRs

#3967: fix(sandbox): correct workspace prompt path

by sweepies open 2026-01-29 12:49 View on GitHub →
agents
When running in a sandbox, agents receive prompt information about their workspace location. Previously, `buildEmbeddedSandboxInfo` returned the host machine's path (for example, `/tmp/moltbot-sandbox`), but tools execute inside a Docker container where the workspace is mounted at `/workspace`. This PR fixes the mismatch by using the container's internal path. Before: ```js workspaceDir: sandbox.workspaceDir // → "/tmp/moltbot-sandbox" ``` After: ```js workspaceDir: sandbox.containerWorkdir // → "/workspace" ``` <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates `buildEmbeddedSandboxInfo` to report the sandbox workspace path as seen from inside the container (`sandbox.containerWorkdir`, e.g. `/workspace`) instead of the host filesystem path (`sandbox.workspaceDir`, e.g. `/tmp/...`). The associated unit tests were updated accordingly, ensuring agents receive workspace prompt information that matches where tools actually execute (inside Docker). <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - The change is narrowly scoped (one field mapping) and aligns the prompt workspace path with the container execution environment; tests were updated to match. No behavioral changes beyond the reported path were introduced. - No files require special attention <!-- greptile_other_comments_section --> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs