Commit af47a08
fix(engine-claude-agent-sdk): set IS_SANDBOX=1 for spawned Claude CLI
The harness always runs the Claude Code CLI with permissionMode
bypassPermissions (--dangerously-skip-permissions). Claude Code refuses that
flag as root and exits 1 ("cannot be used with root/sudo privileges"), which
is exactly what happens in the deployed containers (uid 0) — every agent turn
fails with "Claude Code process exited with code 1" and 0 tokens, surfacing as
an empty reply in the UI.
The CLI is already confined to an isolated substrate workdir, so declare
IS_SANDBOX=1 in the subprocess env to allow skip-permissions regardless of uid.
Defaulted first so ctx.envs can still override.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c8742d9 commit af47a08
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
0 commit comments