Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(tasks): raise pnpm fetch timeout for the local sandbox image (#79377)

Vojta Bartošadf7bb06e14f
diff --git a/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local b/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local
index 221bbee12e9d..9e5d7a094656 100644
--- a/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local
+++ b/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local
@@ -6,10 +6,15 @@ FROM posthog-sandbox-base
COPY local-workspace /local-workspace
+# The agent pulls a few ~100MB platform binaries (@openai/codex, the Claude agent SDK).
+# pnpm's 60s per-request default expires mid-download on a slow link, and the whole layer
+# is then lost to a timeout after ~9 minutes of work.
+ENV npm_config_fetch_timeout=600000
+
RUN cd /local-workspace && \
- pnpm install --filter @posthog/agent... --ignore-scripts --frozen-lockfile && \
+ pnpm install --filter @posthog/agent... --ignore-scripts --frozen-lockfile --config.fetchTimeout=600000 && \
cd /local-workspace/packages/agent && \
pnpm pack --pack-destination /tmp && \
cd /scripts && \
- pnpm install /tmp/posthog-agent-*.tgz --config.dangerouslyAllowAllBuilds=true && \
+ pnpm install /tmp/posthog-agent-*.tgz --config.dangerouslyAllowAllBuilds=true --config.fetchTimeout=600000 && \
rm -rf /tmp/posthog-agent-*.tgz /local-workspace