[BUG] Running File Read on Windows is really slow, almost unusable. Please optimize the cygpath logic!
Resolved 💬 29 comments Opened Dec 8, 2025 by caozhiyuan Closed Feb 11, 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?
Running File Read on Windows is really slow, almost unusable. Please optimize the cygpath logic! On Windows, each read operation takes about 3 seconds on average, while on Linux it's only a few hundred milliseconds! It's even slower in the VSCode extension, and there seems to be some hook script involved.
What Should Happen?
Each file read takes less than one second
Error Messages/Logs
Steps to Reproduce
- open claude --debug
- tell ai read file README
- see debug log
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.61 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
29 Comments
this issue https://github.com/anthropics/claude-code/issues/12578 , also pointed out the problem with cygpath
Yes, please fix currently Claude code is not usable due to this, tried all, the only way is to go to wsl
@ashwin-ant Please optimize the cygpath logic in windows.
One FileRead call invoked cygpath -u over 20 times, causing extremely slow file reading.
@bcherny Please optimize the cygpath logic in windows.
@fvolcic cc
@MO-AI-2000 @honix seems can patch-execsync.
@MO-AI-2000 @honix https://github.com/caozhiyuan/claude-code-patch/blob/main/README.md , support claude.exe and npm app,
Interesting! Looks like a valid workaround. I hope this works for you while claude code team solving this performance issue on Windows. If it does, this is a strong signal for claude code team where to look. I'm using CC via WSL right now, as it works better and doesn't lag.
@honix Yes, this issue has been bothering me for a long time. Today, I used Codex and added some logging output, and found that reading a file requires calling cygpath 20 times. Later, I tried adding caching to cygpath, and the performance became much smoother. However, packaging claude.exe was still somewhat troublesome, so I eventually opted to use USE_BUILTIN_RIPGREP=0. On Windows, I also experimented with WSL2, but there ripgrep was extremely slow every time it ran. I had to configure .ripgreprc to exclude some large directories, and the overall experience wasn't very good either. Do you experience slow rg issues on WSL2?
Search tool works OK on WSL. There is also added latency of windows<->linux filesystem abstraction, but for now it's much better performance than for native Windows.
any feedback?
I've been using https://github.com/caozhiyuan/claude-code-patch/blob/main/patch-execsync.mjs for a while without any issues. Can you officially add cygpath execSync caching functionality for Windows? @bcherny Or ask a colleague who has a Windows system to help check. Thank you for your assistance.
It seems it much better in recent versions of Claude Code. The 2.1.6 (Claude Code) doesnt hangs file reads or something, it feels smooth now.
@honix I just tested 2.1.6 this afternoon, and six parallel reads took 18 seconds. and the issue with running the bash git command and the output temp file being created in the current directory has not yet been resolved.
@honix you run via npm or vscode extension?
Claude Code CLI
Claude Code devs recommends install native build through
claude install.I installed it via npm, but it's not working yet @honix
Did you run
claude install?Make sure you have native build running
in 2.1.12 , not fixed. install via npm and vscode extension
actually yes. i confirm its lags in powershell every prompt
<img width="745" height="192" alt="Image" src="https://github.com/user-attachments/assets/12520d83-b7e2-444c-a89b-2b2b2c09413b" />
@honix you can use https://github.com/caozhiyuan/claude-code-patch. Current stable version: 2.1.7. There is a bug in the bash tool of version 2.1.12. https://github.com/caozhiyuan/claude-code-patch/tree/2.1.7 . just need run node .\patch-cli.mjs --backup and bun build .\cli-entry.mjs --compile --target=bun-windows-x64 --outfile claude.exe .
Has someone referred CC dev team to the claude-code-patch? The Grep and Glob are still very slow in the VS Code plugin v2.1.37.
@sataz-ehl Anthropic might not have anyone using Windows, so the issue has never been addressed, and even with patches, it's not as smooth as on macOS. Using OpenCode on Windows is the best option—it can seamlessly replace Claude Code and runs very smoothly (though you need to disable animations in VSCode, otherwise it will lag).
Glob will be slow in node projects; this is an issue with ripgrep. Adding a .ripgreprc file under the user directory will help, with the following content:
@sataz-ehl
@sataz-ehl @honix seems fixed in 2.1.39
Thank you for your investigation and workaround solution before the official fix. @caozhiyuan
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.