PowerShell tool takes ~3 minutes to spawn in VS Code extension on Windows (Bash tool is instant)
Open 💬 0 comments Opened Jun 19, 2026 by sdjdk
Environment
- Claude Code: 2.1.183
- VS Code: 1.125.1
- OS: Windows 11 (10.0.26200.8655)
- Shell: Windows PowerShell 5.1
Description
In the VS Code extension, every PowerShell tool call takes ~3 minutes from invocation until a result is returned. The delay occurs before the permission prompt appears (for non-pre-approved commands), and also when the command is pre-approved (no prompt shown at all) — so it is not related to permission evaluation. It affects all PowerShell commands equally, trivial or complex.
The Bash tool (Git Bash) on the same machine and in the same session returns instantly for equivalent commands.
Ruled out by direct testing
- PowerShell startup itself is fast:
powershell.exe -Command exitruns in ~0.16s from a manual terminal. - A manually opened PowerShell terminal inside VS Code is instant.
- Not command complexity: simple (
Get-Date) and complex (pipedGet-Process | Where | Sort | Select) are equally slow (~3 min each). - Not the permission allow-list: reproduces with broad pre-approval (
PowerShellallowed, no prompt shown) and after trimming a large allow-list down to a handful of rules. - No hooks configured.
- Bash tool commands (
git rev-parse,echo) on the same machine and session return in well under a second.
Conclusion
The delay appears specific to how the VS Code extension spawns a PowerShell process on Windows. The Bash tool is unaffected.
Repro
- Open a project in the VS Code extension on Windows.
- Have Claude run any PowerShell tool command (e.g.
Get-Date). - Observe a ~3 minute delay before the result/prompt; an equivalent Bash command returns instantly.