Skip to content

Commit 42db83c

Browse files
declan-scaleclaude
andcommitted
fix(cli): install codex CLI in codex template Dockerfiles
Address Greptile review: the default, sync and temporal codex Dockerfiles installed nodejs/npm but never the codex CLI, so scaffolded containers hit FileNotFoundError on `codex` for every request. Add `npm install -g @openai/codex`, matching the claude-code templates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1494818 commit 42db83c

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/agentex/lib/cli/templates/default-codex/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y \
2020
&& apt-get clean \
2121
&& rm -rf /var/lib/apt/lists/*
2222

23+
# Install the codex CLI: the agent shells out to `codex` on every turn, so the
24+
# binary must be present in the runtime image.
25+
RUN npm install -g @openai/codex
26+
2327
RUN uv pip install --system --upgrade pip setuptools wheel
2428

2529
ENV UV_HTTP_TIMEOUT=1000

src/agentex/lib/cli/templates/sync-codex/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y \
2020
&& apt-get clean \
2121
&& rm -rf /var/lib/apt/lists/*
2222

23+
# Install the codex CLI: the agent shells out to `codex` on every turn, so the
24+
# binary must be present in the runtime image.
25+
RUN npm install -g @openai/codex
26+
2327
RUN uv pip install --system --upgrade pip setuptools wheel
2428

2529
ENV UV_HTTP_TIMEOUT=1000

src/agentex/lib/cli/templates/temporal-codex/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y \
2020
&& apt-get clean \
2121
&& rm -rf /var/lib/apt/lists/*
2222

23+
# Install the codex CLI: the activity shells out to `codex` on every turn, so
24+
# the binary must be present in the runtime image.
25+
RUN npm install -g @openai/codex
26+
2327
# Install tctl (Temporal CLI)
2428
RUN ARCH="$(uname -m)" && \
2529
case "$ARCH" in x86_64) TCTL_ARCH=amd64 ;; aarch64|arm64) TCTL_ARCH=arm64 ;; *) TCTL_ARCH=amd64 ;; esac && \

0 commit comments

Comments
 (0)