Windows: tasklist IDE detection causes 5+ minute startup delay when WMI times out
Resolved 💬 3 comments Opened Dec 19, 2025 by thornburywn2 Closed Feb 14, 2026
Bug Description
Claude Code startup takes 5+ minutes on Windows when the tasklist 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 ~/.claude/debug/*.txt:
2025-12-19T16:04:31.133Z [DEBUG] [SLOW OPERATION DETECTED] execSyncWithDefaults_DEPRECATED (304302.1ms): tasklist | findstr /I "Code.exe Cursor.exe Windsurf.exe idea64.exe pycharm64.exe webstorm64.exe phps...
304,302ms = 5+ minutes for a single command during startup.
Root Cause
The tasklist command itself is timing out on this system:
PS> Measure-Command { tasklist | Out-Null }
# ERROR: This operation returned because the timeout period expired.
# TotalSeconds: 304.3213296
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.,
Get-Processvia PowerShell, or skip IDE detection entirely) - Cache the result and only re-run periodically instead of on every startup
Additional Notes
- The function uses
execSyncWithDefaults_DEPRECATEDwhich 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 (winmgmt) may help some users but did not resolve the issue in this case.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗