Windows: tasklist IDE detection causes 5+ minute startup delay when WMI times out
Bug Description
Claude Code startup takes 5+ minutes on Windows when the \ command used for IDE detection times out due to WMI issues.
Environment
- Claude Code Version: 2.0.73
- OS: Windows 11 (Build 26200.7462)
- Platform: Native Windows (not WSL)
- Shell: Git Bash
Debug Log Evidence
From \:
\
304,302ms = 5+ minutes for a single command during startup.
Root Cause
The \ command itself is timing out on this system:
\Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\thorn>
This is a Windows WMI issue, but Claude Code should not block startup for 5+ minutes waiting for this command.
Suggested Fixes
- Add a shorter timeout (e.g., 5-10 seconds) to the IDE detection command
- Run IDE detection asynchronously - don't block startup on this
- Use a fallback method if tasklist times out (e.g., \ via PowerShell, or skip IDE detection entirely)
- Cache the result and only re-run periodically instead of on every startup
Additional Notes
- The function uses \ which suggests it may already be identified as needing improvement
- This issue may affect other Windows users with WMI problems (enterprise environments, antivirus interference, etc.)
- The user's WMI subsystem has issues, but Claude Code should be resilient to this
Workaround
None currently available to users. Restarting the Windows Management Instrumentation service (\) may help some users but did not resolve the issue in this case.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗