[BUG] Multiple CLI instances cause hangs due to MCP server port contention
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Body:
## Description
Running multiple Claude Code CLI instances causes hangs and timeouts. Each instance
spawns its own MCP server processes, causing port contention (especially port 8000
for OAuth) and telemetry export loops.
## Environment
- macOS 14 (Darwin 24.6.0)
- Claude Code CLI (latest)
- MCP servers: playwright, google_workspace, obsidian
## Steps to Reproduce
- Open 3+ terminals and run
claudein each - Work in all windows simultaneously
- Hangs occur within minutes
## Symptoms
Request timed outerrors in debug logs1P event logging: ECONNABORTED, timeout of 10000ms exceededloopsclaude mcp listshows servers as failed despite successful startup- UI freezes even after MCP servers recover
## Differs from #20801
That issue is segfaults from ~/.claude file corruption. This is timeouts from MCP
port contention - no crash, just freeze.
## Workaround
Kill orphaned MCP processes: pkill -f workspace-mcp && pkill -f mcp-obsidian &&
pkill -f playwright-mcp
## Expected
Instances should share MCP servers or use different ports.
What Should Happen?
Instances should share MCP servers or use different ports.
Error Messages/Logs
Steps to Reproduce
- Configure MCP servers (google_workspace uses port 8000 for OAuth)
- Open project from Google Drive shared folder
- Open 3+ terminals and run
claudein each - Work in all windows simultaneously
- Hangs occur within minutes
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.22
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗