From 01901030b2b05b50180d5b8e6f4bb6db18449f43 Mon Sep 17 00:00:00 2001 From: bgagent Date: Wed, 15 Jul 2026 15:17:26 -0400 Subject: [PATCH] fix(agent): re-run install.cjs after npm update in Dockerfile Claude Code 2.1.x ships native binaries via postinstall. The npm update step that patches transitive deps overwrites bin/claude.exe back to the fallback stub, causing 'Exec format error' at runtime. Re-run install.cjs to restore the native binary after the update. --- agent/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/Dockerfile b/agent/Dockerfile index 82c5f5e1..2c38c52a 100644 --- a/agent/Dockerfile +++ b/agent/Dockerfile @@ -55,7 +55,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \ RUN npm install -g npm@latest && \ npm install -g @anthropic-ai/claude-code@2.1.191 && \ CLAUDE_NPM_ROOT="$(npm root -g)/@anthropic-ai/claude-code" && \ - npm --prefix "${CLAUDE_NPM_ROOT}" update tar minimatch glob cross-spawn picomatch + npm --prefix "${CLAUDE_NPM_ROOT}" update tar minimatch glob cross-spawn picomatch && \ + node "${CLAUDE_NPM_ROOT}/install.cjs" # Install uv (fast Python package manager) — pinned for reproducibility COPY --from=ghcr.io/astral-sh/uv:0.11.14 /uv /usr/local/bin/uv