[BUG] Multiple CLI instances cause hangs due to MCP server port contention

Resolved 💬 3 comments Opened Jan 28, 2026 by tonyseale Closed Feb 1, 2026

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

  1. Open 3+ terminals and run claude in each
  2. Work in all windows simultaneously
  3. Hangs occur within minutes

## Symptoms

  • Request timed out errors in debug logs
  • 1P event logging: ECONNABORTED, timeout of 10000ms exceeded loops
  • claude mcp list shows 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

  1. Configure MCP servers (google_workspace uses port 8000 for OAuth)
  2. Open project from Google Drive shared folder
  3. Open 3+ terminals and run claude in each
  4. Work in all windows simultaneously
  5. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗