[Bug] Claude Code hangs unresponsively on macOS M1, requires terminal force-close

Status Open
Reported on v2.1.17
Maintainer reply None cached
Activity 10 comments · opened Jan 23, 2026

Bug Description
I am on a MacBook Pro Chip M1 running macOS Sonoma 14.1.1; using 2.1.17 (Claude Code) and Ghostty 1.2.3; clade code is crashing completely in ways I cannot exit anymore unless I close the terminal (no control-C or anything will make it exit); it happens often (serveral times a day).

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.17
  • Feedback ID: b884162d-7517-4006-a6c2-2388bfd93148

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at vW (/$bunfs/root/claude:11:35097)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at y2R (/$bunfs/root/claude:1479:380)\n    at y2R (/$bunfs/root/claude:1479:1350)\n    at <anonymous> (/$bunfs/root/claude:1479:4440)\n    at <anonymous> (/$bunfs/root/claude:1479:5171)\n    at A (/$bunfs/root/claude:11:7244)\n    at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T15:12:49.893Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/pedromoy/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at vW (/$bunfs/root/claude:11:35097)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at y2R (/$bunfs/root/claude:1479:380)\n    at y2R (/$bunfs/root/claude:1479:1350)\n    at <anonymous> (/$bunfs/root/claude:1479:4483)\n    at <anonymous> (/$bunfs/root/claude:1479:5171)\n    at A (/$bunfs/root/claude:11:7244)\n    at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T15:12:49.893Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/pedromoy/.local/share/claude/versions/2.1.17 (expected in multi-process scenarios)\n    at RYR (/$bunfs/root/claude:3902:2091)\n    at GbA (/$bunfs/root/claude:3902:1202)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-23T15:12:49.906Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at vW (/$bunfs/root/claude:11:35097)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at y2R (/$bunfs/root/claude:1479:380)\n    at y2R (/$bunfs/root/claude:1479:1350)\n    at <anonymous> (/$bunfs/root/claude:1479:4440)\n    at <anonymous> (/$bunfs/root/claude:1479:5171)\n    at A (/$bunfs/root/claude:11:7244)\n    at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T15:12:52.117Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/pedromoy/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at vW (/$bunfs/root/claude:11:35097)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at y2R (/$bunfs/root/claude:1479:380)\n    at y2R (/$bunfs/root/claude:1479:1350)\n    at <anonymous> (/$bunfs/root/claude:1479:4483)\n    at <anonymous> (/$bunfs/root/claude:1479:5171)\n    at A (/$bunfs/root/claude:11:7244)\n    at pX8 (/$bunfs/root/claude:4784:4342)","timestamp":"2026-01-23T15:12:52.117Z"}]

View original on GitHub ↗

10 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/20120
  2. https://github.com/anthropics/claude-code/issues/20339
  3. https://github.com/anthropics/claude-code/issues/20191

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

dannon · 7 months ago

I'm also hitting this. One observation that might help debugging:

Running claude doctor in another tmux pane actually unlocks my stuck claude session and gets it functional again - but then the doctor pane itself gets stuck.

This strongly suggests file/lock contention on the binary at ~/.local/share/claude/versions/2.1.17. Looking at the error logs in this issue, there's:

Lock acquisition failed for /Users/xxx/.local/share/claude/versions/2.1.17

It appears Claude Code uses advisory locking (flock) on the version binary. When one process holds an exclusive lock and hangs (possibly waiting on API response or similar), other processes queue up waiting for the lock. When doctor runs, it seems to either release or inherit the lock situation.

You can see current holders with: lsof +D ~/.local/share/claude/versions/

Environment:

  • Platform: darwin arm64
  • OS: macOS 26.2
  • Terminal: tmux
  • Version: 2.1.17

(this comment posted from claude code)

rcbeall1 · 7 months ago

Same issue.

ngalatis · 7 months ago
I'm also hitting this. One observation that might help debugging: Running claude doctor in another tmux pane actually unlocks my stuck claude session and gets it functional again - but then the doctor pane itself gets stuck. This strongly suggests file/lock contention on the binary at ~/.local/share/claude/versions/2.1.17. Looking at the error logs in this issue, there's: `` Lock acquisition failed for /Users/xxx/.local/share/claude/versions/2.1.17 ` It appears Claude Code uses advisory locking (flock) on the version binary. When one process holds an exclusive lock and hangs (possibly waiting on API response or similar), other processes queue up waiting for the lock. When doctor runs, it seems to either release or inherit the lock situation. You can see current holders with: lsof +D ~/.local/share/claude/versions/` Environment: Platform: darwin arm64 OS: macOS 26.2 Terminal: tmux Version: 2.1.17 _(this comment posted from claude code)_

I can confirm that this small "workaround" has the same exact effect on me as well. Very good investigation.

StreamlinedStartup · 7 months ago

Same issue on OSX 15.7.1 in Terminal. Claude Doctor workaround does not work.

phrmoy · 7 months ago

claude code v2.1.25; things have improved but continues to happen;

ethanolle · 7 months ago

Same here that's unusable

tarik0 · 6 months ago

Same here, entire iTerm gets stuck

phrmoy · 6 months ago

Claude Code v2.1.39;

Claude has become my main tool for development;

The hangs have become more often (again); I am back to starting over sessions several times a day because of total unreasonable freezes. As the main tool for development, this is a very severe issue for me and my development team.

Looking forward to any advice; any more information I can be providing.

kam-hak · 5 months ago

roughly the same thing happened to me. never returns control to the user (m4 pro with most recent CC)

https://github.com/anthropics/claude-code/issues/42645