Tools fail after 5 minutes on Windows 10

Resolved 💬 3 comments Opened Dec 16, 2025 by nir-eng Closed Dec 20, 2025

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?

Claude Code tools (Bash, Read, Write, Edit, etc.) should remain
functional throughout the entire VSCode session without timing out
or failing.

What Should Happen?

Claude Code tools (Bash, Read, Write, Edit, etc.) should remain
functional throughout the entire VSCode session without timing out
or failing.

Users should be able to work continuously for hours without needing
to reload the window or restart VSCode.

All file operations and bash commands should execute successfully
regardless of how much time has passed since opening VSCode.
What Actually Happens (Actual Behavior):

After approximately 5 minutes of working in VSCode with Claude Code
extension on Windows 10, all tools stop working.

Error messages appear:

  • "Command failed: cygpath -u 'C:\Users\worker\AppData\Local\Temp'"
  • File read/write operations fail
  • Bash commands fail

The only temporary solution is to reload the window (Ctrl+R) or
restart VSCode, which restores functionality for another 5 minutes
before the cycle repeats.
Steps to Reproduce:

  1. Install Claude Code extension on Windows 10
  2. Open a project folder (e.g., C:\Agent)
  3. Start working with Claude (ask it to read files, run commands)
  4. Wait 5-10 minutes
  5. Try to use any tool (Read, Bash, Write, etc.)
  6. Tools fail with cygpath or permission errors

Error Messages/Logs

Error messages appear:
- "Command failed: cygpath -u 'C:\Users\worker\AppData\Local\Temp'"
- File read/write operations fail
- Bash commands fail

Steps to Reproduce

claude-code-bug-report.md

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.x

Claude Code Version

2.0.70

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Configuration Files:
.vscode/settings.json:

{
"claudeCode.allowDangerouslySkipPermissions": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.profiles.windows": {
"Command Prompt": {
"path": "${env:windir}\\System32\\cmd.exe",
"args": [],
"icon": "terminal-cmd"
}
}
}
Note: Tried multiple configurations including PowerShell and Git Bash as default terminal - issue persists with all configurations.
Error Examples:
Error when trying to use Bash tool:

Command failed: cygpath -u 'C:\Users\worker\AppData\Local\Temp'
Error when trying to use Read tool:

Error calling tool (Read): Command failed: cygpath -u 'c:\Agent\.vscode\settings.json'
PowerShell conflicts (when using PowerShell as default):

extglob.ProcessName : The term 'extglob.ProcessName' is not recognized...
(repeated hundreds of times)
Observations:
Timing Pattern: Tools work perfectly for first 5-10 minutes after reload/restart
Consistent Failure: After timeout, ALL tools fail (not just specific ones)
Recovery Method: Only window reload (Ctrl+R) or VSCode restart temporarily fixes it
Environment Issue: The error mentions cygpath even when using PowerShell or CMD as default terminal, suggesting Git Bash interference
Project Size: Large project (~1000+ files) - unsure if related
Troubleshooting Attempts:
✅ Changed terminal from Git Bash to PowerShell - didn't help
✅ Changed terminal to CMD - didn't help
✅ Added "claudeCode.allowDangerouslySkipPermissions": true - didn't help
✅ Cleared VSCode cache - didn't help
✅ Reinstalled Claude Code extension - didn't help
System Environment:

OS: Windows 10 Build 19045
Git Bash: Installed (C:\Program Files\Git\bin\bash.exe)
PowerShell: Version 5.1
Node.js: [גרסה שלך אם יש]
Working Directory: C:\Agent (local NTFS drive)
Impact:
This issue makes Claude Code practically unusable on Windows for any work session longer than 5 minutes. It severely disrupts development workflow as users must constantly reload the window, losing context and momentum.
Possible Root Cause (hypothesis):
The extension appears to have a shell process or file handle that times out or gets corrupted after a few minutes on Windows. The cygpath error suggests Git Bash environment variables or paths are being used even when different terminals are configured.

View original on GitHub ↗

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