Commit 5d553ca
committed
fix(remote-worker): create /workspace in the leaf images
The harness execs every tool call from its sandbox working directory, which
defaults to /workspace (KAGENTI_SANDBOX_CWD, select-sandbox.ts). Neither leaf
image created it, so the worker's `bash -c` died before running anything the
caller asked for:
bash: line 1: cd: /workspace: No such file or directory
Command exited with code 1
and the harness reported a tool error for a sandbox that was attached, healthy,
and reachable. Found on a real VM run while proving that /turn now routes tool
calls into the pool: the exec arrived at the leaf correctly and died on the cd,
which is a more confusing failure than not arriving at all -- the pool looks
fine, the relay looks fine, and only the tool result says otherwise.
Both image definitions get it, since either can be the sandbox: Dockerfile
(multi-stage, builds the binary) and Dockerfile.runtime (packages a prebuilt
one). Owned 1001:0 and mode 775 because that is the uid/gid these images run as
under the nonroot-v2 SCC, so the agent can write in its own workspace.
This is what the Dockerfile's own comment already promised and did not deliver --
"this stage exists so the standalone demo image works on its own". It did not: as
a sandbox it failed every tool call.
Verified on hardware after rebuilding: /workspace present as
drwxrwxr-x 1001 root, all three leaves attached, and a /turn tool call's file
landed in sh-sandbox-2 while nothing appeared in the supervisor unit's PrivateTmp
namespace -- the negative half being the one that matters, since before the
routing fix that was the only place it ever appeared.
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>1 parent 694464d commit 5d553ca
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
0 commit comments