Session crashes when connected MCP server restarts
Resolved 💬 3 comments Opened Mar 13, 2026 by dccarbone Closed Mar 17, 2026
Description
The CLI session crashes/exits when an MCP server it's connected to is restarted, even from a separate terminal.
Steps to reproduce
- Start a local MCP server (e.g., FastMCP on port 3000)
- Connect the CLI to it (server shows ListTools/ListResources requests)
- In a separate terminal, kill and restart the MCP server:
lsof -ti:3000 | xargs kill; sleep 1; nohup uv run my-mcp-server &
- CLI session crashes immediately
Expected behavior
Should handle MCP server disconnection gracefully — show an error/warning and allow reconnection via /mcp.
Actual behavior
The entire session exits with no error message. The statusline shows the session resume command, suggesting an unclean exit.
Environment
- macOS Darwin 25.2.0
- MCP server: FastMCP 1.6+ (Streamable HTTP transport on port 3000)
- Model: Opus 4.6 (1M context)
Workaround
None found. Even restarting the MCP from a separate terminal crashes the connected session.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗