[Bug] Unhandled promise rejection on non-writable temp directory causes startup hang

Resolved 💬 4 comments Opened Jan 27, 2026 by sourishkrout Closed Feb 28, 2026

Bug Description
Turns out when Claude's temp files aren't writable (unclear how I got into the state), the CLI and Extension will just hang at startup due to an unhandled promise rejection in e.g. /private/tmp/claude/-Users-mirascope.

This kept me busy for 2h reinstalling/rebooting etc but was actually easily identified once I set CLAUDE_CODE_DIAGNOSTICS_FILE=/Users/mirascope/.claude/debug/diagnostics.log.

Perhaps it'd be more fruitful to have a catchall rejection handler that at least shows a strack trace? I and/or Claude could have fix this in seconds.

Thank you!

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.19
  • Feedback ID: 0bea6128-9e13-4771-9ec2-0cdf6407355b

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 mW (/$bunfs/root/claude:11:35435)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at ILR (/$bunfs/root/claude:2215:380)\n    at ILR (/$bunfs/root/claude:2215:1350)\n    at <anonymous> (/$bunfs/root/claude:2215:4440)\n    at <anonymous> (/$bunfs/root/claude:2215:5171)\n    at A (/$bunfs/root/claude:11:7259)\n    at FZ8 (/$bunfs/root/claude:4862:4342)","timestamp":"2026-01-27T00:50:12.639Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/mirascope/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at mW (/$bunfs/root/claude:11:35435)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at ILR (/$bunfs/root/claude:2215:380)\n    at ILR (/$bunfs/root/claude:2215:1350)\n    at <anonymous> (/$bunfs/root/claude:2215:4483)\n    at <anonymous> (/$bunfs/root/claude:2215:5171)\n    at A (/$bunfs/root/claude:11:7259)\n    at FZ8 (/$bunfs/root/claude:4862:4342)","timestamp":"2026-01-27T00:50:12.639Z"}]

View original on GitHub ↗

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