Claude CLI crashes with EOPNOTSUPP when browser bridge socket file exists
Resolved 💬 3 comments Opened Jan 3, 2026 by anneschuth Closed Jan 8, 2026
Description
Claude CLI crashes on startup when a claude-mcp-browser-bridge-* socket file exists in the temp directory. The CLI tries to fs.watch() the socket file, which fails with EOPNOTSUPP because you cannot watch Unix socket files.
Environment
- macOS 14.x (Darwin 24.6.0)
- Bun v1.3.5
- Claude Code v2.0.76
Steps to Reproduce
- Use Claude CLI with Chrome integration (
--chromeflag or browser extension) - This creates a socket file at
$TMPDIR/claude-mcp-browser-bridge-$USER - Close the Claude session (the socket file remains)
- Start a new Claude CLI session
- CLI crashes immediately
Error Output
EOPNOTSUPP: unknown error, watch '/var/folders/xx/.../T/claude-mcp-browser-bridge-username'
path: "/var/folders/xx/.../T/claude-mcp-browser-bridge-username",
syscall: "watch",
errno: -102,
filename: "/var/folders/xx/.../T/claude-mcp-browser-bridge-username",
code: "EOPNOTSUPP"
at new FSWatcher (node:fs:29:31)
at watch (node:fs:296:10)
at AC_ (/$bunfs/root/claude:392:6265)
at PMD (/$bunfs/root/claude:392:11479)
at _watchWithNodeFs (/$bunfs/root/claude:392:6746)
at _handleFile (/$bunfs/root/claude:392:7489)
at _addToNodeFs (/$bunfs/root/claude:392:10516)
Bun v1.3.5 (macOS arm64)
Root Cause
The file at $TMPDIR/claude-mcp-browser-bridge-$USER is a Unix socket (file type s):
srw-------@ 1 user staff 0 Dec 27 07:49 claude-mcp-browser-bridge-username
fs.watch() does not support watching socket files on macOS, resulting in EOPNOTSUPP.
Workaround
Manually delete the socket file:
rm $TMPDIR/claude-mcp-browser-bridge-$USER
Or programmatically before starting Claude CLI:
// Check for and remove stale browser bridge socket files
const files = readdirSync(tmpdir());
for (const file of files) {
if (file.startsWith('claude-mcp-browser-bridge-')) {
const filePath = join(tmpdir(), file);
const stats = statSync(filePath);
if (stats.isSocket()) {
unlinkSync(filePath);
}
}
}
Expected Behavior
Claude CLI should handle the case where the browser bridge socket file already exists, either by:
- Not trying to
fs.watch()socket files - Cleaning up stale socket files before attempting to watch
- Gracefully handling the
EOPNOTSUPPerror
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗