Repository navigation
fix(showcase): install curl in TS runtime stages — watchdog probes were silently exiting rc=127 - #4174
Merged
Conversation
… silently exiting rc=127 The multi-stage Docker refactor (#4147) moved TypeScript showcase services to `node:22-slim` runtime. That base image does NOT include `curl`. entrypoint.sh's watchdog runs `curl -sS --max-time 5 http://127.0.0.1:8124/ok` every 5s to probe the liveness endpoint. Without curl the probe exits rc=127 "command not found" every cycle. After 180s grace + 3x30s strikes the watchdog kills the agent process. Railway auto-restarts. Kill-loop forever. Verified via `railway ssh --service showcase-langgraph-typescript`: sh: 1: curl: not found rc=127 while `ss -tlnp` on the same container confirmed BOTH 0.0.0.0:8123 (langgraph-api) and 0.0.0.0:8124 (liveness.mjs) LISTEN. The agent servers were healthy the whole time — the probe tool was missing. Fix: add `apt-get install -y --no-install-recommends curl` to the runtime stage of: - showcase/starters/template/dockerfiles/Dockerfile.typescript (source) - showcase/packages/claude-sdk-typescript/Dockerfile - showcase/packages/langgraph-typescript/Dockerfile - showcase/packages/mastra/Dockerfile 3 starter Dockerfiles regenerated from the template via `pnpm -C showcase/scripts generate-starters`. Python/Java/.NET services already install curl (they need it for NodeSource or similar) and are unaffected. Smoke: local `docker build --platform linux/amd64` for both starter + package variants succeeded; `docker run ... sh -c "which curl"` prints /usr/bin/curl in both.
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
April 22, 2026 20:33
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
3 tasks
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
…re silently exiting rc=127 (CopilotKit#4174) ## Summary - Add `curl` to the runtime `apt-get install` line in: - `showcase/starters/template/dockerfiles/Dockerfile.typescript` - `showcase/packages/{claude-sdk-typescript,langgraph-typescript,mastra}/Dockerfile` - 3 starter Dockerfiles (regenerated from template) ## Why Multi-stage Docker refactor (CopilotKit#4147) moved TS showcase services to `node:22-slim` runtime. That base image doesn't include `curl`. The watchdog's liveness probe invokes `curl -sS --max-time 5 http://127.0.0.1:8124/ok` — which exits `rc=127 "command not found"` every cycle. After 180s grace + 3×30s strikes the watchdog kills the agent. Railway auto-restarts. Loop forever. Verified via `railway ssh`: ``` sh: 1: curl: not found rc=127 ``` while `ss -tlnp` on the same container confirmed both :8123 (langgraph-api) and :8124 (liveness.mjs) LISTEN. The agent was always healthy — the probe was broken. ## Test plan - [ ] Local amd64 docker build for starter+package variants succeeds - [ ] `docker run ... sh -c "which curl"` prints `/usr/bin/curl` - [ ] After Railway redeploy of langgraph-typescript, steady-state: no kill-loop, `/api/health` green
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
curlto the runtimeapt-get installline in:showcase/starters/template/dockerfiles/Dockerfile.typescriptshowcase/packages/{claude-sdk-typescript,langgraph-typescript,mastra}/DockerfileWhy
Multi-stage Docker refactor (#4147) moved TS showcase services to
node:22-slimruntime. That base image doesn't includecurl. The watchdog's liveness probe invokescurl -sS --max-time 5 http://127.0.0.1:8124/ok— which exitsrc=127 "command not found"every cycle. After 180s grace + 3×30s strikes the watchdog kills the agent. Railway auto-restarts. Loop forever.Verified via
railway ssh:while
ss -tlnpon the same container confirmed both :8123 (langgraph-api) and :8124 (liveness.mjs) LISTEN. The agent was always healthy — the probe was broken.Test plan
docker run ... sh -c "which curl"prints/usr/bin/curl/api/healthgreen