[BUG] Claude Code IDE Integration w/ Cursor Becomes Unresponsive
Resolved 💬 3 comments Opened Aug 3, 2025 by welr Closed Aug 15, 2025
Claude Code IDE Integration Becomes Unresponsive
Environment
- Claude Code Version: 1.0.67
- IDE: Cursor
- OS: macOS Darwin 24.5.0
- Node Version: v23.10.0
Issue Description
The /ide command frequently fails to connect to Cursor, even when:
- Cursor is running and active
- The lock file exists at
~/.claude/ide/44022.lockwith correct PID and workspace info - The process shows Cursor listening on port 44022
Symptoms
- Running
/idecommand returns no output or hangs - Lock file shows valid connection details:
``json``
{
"pid": 8968,
"workspaceFolders": ["/path/to/workspace"],
"ideName": "Cursor",
"transport": "ws",
"authToken": "..."
}
lsof -i :44022confirms Cursor is listening on the port- However, the IDE server appears unresponsive (e.g.,
curl http://localhost:44022/healthtimes out)
Current Workaround
- Remove the lock file:
rm ~/.claude/ide/44022.lock - Run
/idecommand again - Connection usually succeeds after removing stale lock
Expected Behavior
The IDE integration should:
- Detect when the connection becomes stale
- Automatically reconnect or refresh the connection
- Provide clear error messages when connection fails
Suggested Improvements
- Add health check before attempting to use existing connection
- Implement automatic reconnection when server becomes unresponsive
- Add timeout and retry logic for IDE commands
- Provide diagnostic information when connection fails (e.g., "IDE server not responding on port 44022")
Frequency
This issue occurs if Cursor crashes or is closed while Claude Code is connected, requiring manual intervention.
Additional Context
Running with CLAUDE_DEBUG=1 doesn't provide additional diagnostic information about the IDE connection failure. The issue appears to be that the WebSocket connection becomes stale but the lock file persists, preventing automatic reconnection.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗