[BUG] Hook .sh scripts open in VSCode instead of executing on Windows Terminal/PowerShell
Resolved 💬 10 comments Opened Oct 17, 2025 by neurosie Closed Mar 9, 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?
I installed a plugin with a startup hook, specified as:
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
}
When I start claude from the Windows Terminal, a VSCode window opens with the session-start.sh file, and the only output I get in the terminal is like:
[main 2025-10-17T18:19:45.366Z] update#setState idle
[main 2025-10-17T18:20:15.378Z] update#setState checking for updates
[main 2025-10-17T18:20:15.501Z] update#setState idle
When I close the VSCode window, then Claude Code's splash screen finally displays back in the terminal.
What Should Happen?
Claude Code should execute the .sh script.
Error Messages/Logs
Steps to Reproduce
- On Windows, open the Windows Terminal and a PowerShell tab
- Run Claude Code (
claude) and install a plugin with a hook, like obra/superpowers - Restart Claude Code to have the plugin take effect
- Observe that a VSCode opens and the plugin script does not run
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.21
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗