[BUG] Native binary v2.1.126 silently exits when additionalDirectories references inaccessible network drive (Windows)

Resolved 💬 2 comments Opened May 1, 2026 by josepforadada Closed May 1, 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?

The Claude Code native binary (v2.1.126) silently exits with code 0 when additionalDirectories in ~/.claude/settings.json or project .claude/settings.json references an inaccessible/offline network drive (e.g. Z:\).
No output is produced on stdout or stderr. The debug log (--debug-file) stops abruptly after "No git remote URL found" — the entire session initialization phase (MCP loading, setup, skills, OAuth, API call) is never reached.
The process appears to hang for ~20 seconds trying to access the unavailable path, then exits cleanly (code 0) without any error or warning.

What Should Happen?

Claude Code should gracefully skip inaccessible directories in additionalDirectories with a warning in the debug log, and continue startup normally. An unreachable network path should never prevent the CLI from functioning.

Error Messages/Logs

No error messages — that's the bug. Debug log ends here and never progresses further:
2026-05-01T18:37:17.036Z [DEBUG] Git remote URL: null
2026-05-01T18:37:17.037Z [DEBUG] No git remote URL found
[EOF — process exits with code 0, no further output]
Expected debug log (from working v2.1.89 session) should continue with:
[STARTUP] Loading MCP configs...
[STARTUP] Running setup()...
Loading skills from: ...
[API:auth] OAuth token check starting
[API REQUEST] /v1/messages ...

Steps to Reproduce

  1. On Windows, map a network drive letter (e.g. Z:) to a NAS or network share
  2. Add paths from that drive to ~/.claude/settings.json:

```json
{
"permissions": {
"additionalDirectories": [
"Z:\\some\\path"
]
}
}
Disconnect/turn off the network share so Z: is mapped but inaccessible
Run: claude --print "hello" --debug-file debug.txt
Result: Exit code 0, zero stdout/stderr output, debug log stops at git remote check
Remove the Z: path from settings → works immediately

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.89 (JS CLI variant handled this correctly on the same machine with the same settings)

Claude Code Version

2.1.126 (Claude Code) — native binary, win32-x64

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Auth is valid (claude auth status returns correct JSON with pro subscription)
The --bare flag does NOT help — same silent exit
Even setting ANTHROPIC_API_KEY to a test value produces the same silent exit (never reaches auth phase)
Workaround: Remove all inaccessible paths from additionalDirectories
The Z: drive shows: Test-Path "Z:" = False, Get-PSDrive Z shows Used=0, Free=empty
The older JS CLI (v2.1.89) ran from the same settings.json without any issue on April 29

View original on GitHub ↗

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