Skip to content

Commit 77e7d03

Browse files
cliffhallclaude
andcommitted
fix: stop the HTTP smoke server by pid; say the Python servers start silently
Copilot round 7 on #4921. - client-smoke: the HTTP recipe captures the server's pid and kills that, instead of assuming it is shell job 1. - local-dev: only the TypeScript servers print a startup banner; the Python servers print nothing at their default log level. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 14879aa commit 77e7d03

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎.claude/skills/client-smoke/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,17 @@ the URL. The transport is inferred from the path: `/mcp` is Streamable HTTP,
130130

131131
```sh
132132
PORT=3917 node src/everything/dist/index.js streamableHttp &
133+
SERVER_PID=$!
133134
# Wait for the listener: the server answers before the CLI is pointed at it.
134135
until curl -s -o /dev/null http://localhost:3917/mcp; do sleep 0.2; done
135136
$INSPECT http://localhost:3917/mcp \
136137
--method tools/call --tool-name echo --tool-arg message=over-http --format json
137-
kill %1
138+
kill "$SERVER_PID" # this server, by pid; `kill %1` would hit whatever job 1 is
138139
```
139140

141+
Stop the server even when the CLI call fails; a listener left on the port
142+
makes the next run talk to the old build.
143+
140144
Without the wait, the CLI can reach the port before the server is listening
141145
and fail with a refused connection. In a separate terminal the equivalent is
142146
waiting for the `listening on port` line on stderr.

‎.claude/skills/local-dev/SKILL.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ anything else; the first `uv run` in a Python server builds its environment.
3636

3737
## Run a server
3838

39-
Every server speaks stdio. A stdio server started by hand prints a banner on
40-
stderr and then waits for JSON-RPC on stdin, so on its own this only shows
41-
that it boots; to send it requests, use `/client-smoke`.
39+
Every server speaks stdio. A stdio server started by hand waits for JSON-RPC
40+
on stdin, so on its own this only shows that it boots; to send it requests,
41+
use `/client-smoke`. The TypeScript servers print a startup banner on stderr
42+
first. The Python servers print nothing at the default log level, so a silent
43+
terminal is a running server, not a hung one.
4244

4345
| Server | From the repo root | Arguments and environment |
4446
| --- | --- | --- |

0 commit comments

Comments
 (0)