Uncaught ZodError in channel-notification handler kills the entire MCP STDIO connection (non-string meta value)
Open 💬 1 comment Opened Jun 11, 2026 by tsuromer
Summary
A notifications/claude/channel notification (custom channel via --dangerously-load-development-channels) whose params.meta contains a non-string value raises an uncaught ZodError in the client's notification handler — and instead of rejecting just that notification, the entire MCP STDIO connection is torn down.
Repro
Any stdio MCP server that declares the claude/channel capability and emits:
{"method":"notifications/claude/channel","params":{"content":"hi","meta":{"sender":"x","sender_verified":false}}}
Observed (client MCP log, ~/.cache/claude-cli-nodejs/<proj>/mcp-logs-<server>/*.jsonl)
STDIO connection dropped after 473s uptime
Connection error: Uncaught error in notification handler: $ZodError: [
{ "expected": "string", "code": "invalid_type",
"path": ["params","meta","sender_verified"],
"message": "Invalid input: expected string, received boolean" } ]
Reproduced on 2.1.170 and 2.1.173, Linux.
Impact
The blast radius is the whole server connection — all of the server's tools drop mid-session, while the server side sees a successful stdio write. No user-visible error is surfaced, which makes this very hard to diagnose.
Expected
- Schema-invalid notifications rejected/logged per-notification (error-isolated handler), not a connection teardown.
- A user-visible warning naming the offending server + path.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗