[BUG] Native Windows binary fails on every prompt and command
Resolved 💬 5 comments Opened Apr 22, 2026 by silver886 Closed Jul 7, 2026
## Additional reproduction: EEXIST on Windows directory junctions in config path ### Reproduction The config path atC:\Users\<username>\path\to\claude-code\configis a Windows directory junction (valid, functions as a real directory). The native build (exe) intermittently fails with: ``API Error: EEXIST: file already exists, mkdir 'C:\Users\<username>\path\to\claude-code\config'`### Key observations | Scenario | Result | |----------|--------| | Native build (exe) — cold start | EEXIST error | | npm package (cli.js) — same junction | Works correctly | | Native build — after running npm package | Works temporarily | | Native build — after some time passes | EEXIST error returns | - The **npm package** works correctly with the same directory junction and does **not** replace or modify it - After running the npm package, the **native build temporarily works again** on the exact same unchanged junction - After a while, the native build starts failing again - The junction itself is **never modified** by either version — verified withdir /AL### Analysis This suggests the native build's runtime (Bun) handlesfs.mkdir()differently than Node.js when encountering a directory junction. Node.js (used by the npm package) correctly recognizes the junction as an existing directory, while Bun'sfsimplementation does not — at least under certain initialization conditions. This is the samemkdirwithout{ recursive: true }` root cause discussed in this thread, but the directory junction adds a consistent reproduction path. The intermittent "works after npm run" behavior may indicate that the npm package warms up some cached state that the native build then benefits from temporarily. ### Environment - OS: Windows 11 Pro (10.0.26200.8037) - Claude Code: 2.1.76, native build (exe), direct download - Shell: PowerShell 7.5.5
_Originally posted by @silver886 in #27791_
The issue still present in latest version (2.1.117) and, since npm package (cli.js) is removed, there is no way to make native build works again other than move all config to another folder.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗