Skip to content

fix(serve): say what startup waits for and which MCP servers failed - #531

Merged
mrnasil merged 1 commit into
mainfrom
fix/serve-mcp-startup
Dec 2, 2026
Merged

mrnasil merged 1 commit into
mainfrom
fix/serve-mcp-startup

Conversation

@mrnasil

@mrnasil mrnasil commented Dec 2, 2026

Copy link
Copy Markdown
Member

From the same source audit as #527–#530.

whycodes serve connects the configured MCP servers before it binds, so one server that never answers delays every endpoint, health included, by up to 60 s. It printed nothing during that wait, and a server that failed to connect was dropped without a word.

  • Before connecting, serve prints how many servers it waits for and the limit.
  • Each server that did not connect gets a warning line on stderr, with its hint.

Not changed

serve still waits for the servers before accepting requests. Accepting first means installing the tools into an agent that is already shared with running requests, and replacing that agent would drop state it holds (the steering inbox, activated tools). The wait is bounded at 60 s per server since the start timeout was added; this PR only makes it visible.

Verification

Unit test for both message helpers; clippy and the budget scripts pass. No line in a 100%-floor crate changed (one constant in whycodes-agent became pub).

🤖 Generated with Claude Code

serve connects the configured MCP servers before it accepts requests (up to
60 s for one that never answers) and printed nothing meanwhile; a server
that did not connect was dropped silently. It now prints the wait and one
warning per failed server.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@mrnasil
mrnasil enabled auto-merge (squash) December 2, 2026 16:12
@mrnasil
mrnasil merged commit bf47227 into main Dec 2, 2026
7 checks passed
@mrnasil
mrnasil deleted the fix/serve-mcp-startup branch December 2, 2026 16:21
@mrnasil mrnasil mentioned this pull request Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant