[BUG] Hang on macOS when passing `--settings` while sockets or fifo's are present in $TMPDIR

Resolved 💬 2 comments Opened Jan 6, 2026 by asm89 Closed Jan 6, 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?

When using the --settings flag claude either hangs forever at startup. Or it does boot up, but hangs shortly after the TUI shows up.

The issue start happening in version 2.0.72, but doesn't repro on 2.0.71.

What Should Happen?

Claude Code should just work.

Error Messages/Logs

No error per se, but sending SIGINT to the process it sometimes dumps a stack like:


    const error = new UVException({
                  ^

Error: EINTR: interrupted system call, watch '/var/folders/94/9m0d2z9n42zffd3pgl73jh600000gn/T/claude-hang'
    at FSWatcher.<computed> (node:internal/fs/watchers:254:19)
    at watch (node:fs:2539:36)
    at c7B (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:6437)
    at gO8 (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:11600)
    at xp1._watchWithNodeFs (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:6918)
    at xp1._handleFile (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:7644)
    at xp1._addToNodeFs (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:10652)
Emitted 'error' event on fp1 instance at:
    at fp1._handleError (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:22031)
    at xp1._addToNodeFs (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:398:10749) {
  errno: -4,
  syscall: 'watch',
  code: 'EINTR',
  path: '/var/folders/94/9m0d2z9n42zffd3pgl73jh600000gn/T/claude-hang',
  filename: '/var/folders/94/9m0d2z9n42zffd3pgl73jh600000gn/T/claude-hang'
}

Steps to Reproduce

$ mkfifo $TMPDIR/claude-hang
$ claude --settings '{}'

Note that claude either hangs at startup, or the TUI goes unresponsive.

You can "unblock" claude by writing to the fifo:

$ echo unblock > $TMPDIR/claude-hang

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.71

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Created a socket in $TMPDIR also works, but seems to print an error, but not hang:

$ nc -lU $TMPDIR/claude-hang-socket

My guess is that the fs watcher is trying to watch too many things in $TMPDIR?

View original on GitHub ↗

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