From 6036fd988bd4f59565da2e608c068661b174591d Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Sun, 29 Mar 2026 23:52:32 +0900 Subject: [PATCH] fix: remap host paths to container mount points for EJCLAW_WORK_DIR and CLAUDE_CONFIG_DIR Host paths passed via envOverrides don't exist inside the container, causing ENOENT when the SDK tries to spawn with a non-existent CWD. Now remaps EJCLAW_WORK_DIR to /workspace/project and CLAUDE_CONFIG_DIR to /home/node/.claude (matching the container mount points). --- src/container-runner.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/container-runner.ts b/src/container-runner.ts index 77b2e06..4f57c22 100644 --- a/src/container-runner.ts +++ b/src/container-runner.ts @@ -234,6 +234,15 @@ function buildContainerArgs( key === 'CLAUDE_CODE_OAUTH_TOKEN' ) continue; + // Remap host paths to container mount points + if (key === 'EJCLAW_WORK_DIR') { + args.push('-e', 'EJCLAW_WORK_DIR=/workspace/project'); + continue; + } + if (key === 'CLAUDE_CONFIG_DIR') { + args.push('-e', 'CLAUDE_CONFIG_DIR=/home/node/.claude'); + continue; + } args.push('-e', `${key}=${value}`); } }