fix (agents/sandbox): clarify container-vs-host workspace paths in prompt

This commit is contained in:
Vignesh Natarajan
2026-02-15 19:15:57 -08:00
parent ab1dc89a2d
commit 799049f586
2 changed files with 6 additions and 4 deletions

View File

@@ -454,10 +454,12 @@ describe("buildAgentSystemPrompt", () => {
expect(prompt).toContain("Your working directory is: /workspace");
expect(prompt).toContain(
"For read/write/edit/apply_patch, file paths resolve against host workspace: /tmp/openclaw.",
"For read/write/edit/apply_patch, file paths resolve against host workspace: /tmp/openclaw. For bash/exec commands, use sandbox container paths under /workspace (or relative paths from that workdir), not host paths.",
);
expect(prompt).toContain("Sandbox container workdir: /workspace");
expect(prompt).toContain("Sandbox host workspace: /tmp/sandbox");
expect(prompt).toContain(
"Sandbox host mount source (file tools bridge only; not valid inside sandbox exec): /tmp/sandbox",
);
expect(prompt).toContain("You are running in a sandboxed runtime");
expect(prompt).toContain("Sub-agents stay sandboxed");
expect(prompt).toContain("User can toggle with /elevated on|off|ask|full.");