Skip to content

[Windows] Blank terminal window opens on Claude Code startup due to -l flag in run-hook.cmd #292

@PAMulligan

Description

@PAMulligan

Describe the bug
When starting Claude Code on Windows with the Superpowers plugin enabled, a blank Windows terminal window opens and remains visible. The terminal has no content and cannot accept input. This happens every time Claude Code starts or resumes a session.

To Reproduce
Steps to reproduce the behavior:

  1. Install Superpowers plugin via /plugin install superpowers@superpowers-marketplace
  2. Ensure the plugin is enabled in ~/.claude/settings.json
  3. Start Claude Code (or resume an existing session)
  4. Observe a blank terminal window appears alongside the Claude Code interface

Expected behavior
The SessionStart hook should execute silently in the background without creating any visible terminal windows. The hook should inject context into Claude without user-visible side effects.

Logs
The hook executes successfully (no errors), showing:
SessionStart:startup hook success: Success

However, the terminal window remains open throughout the Claude Code session.

Additional context
Root Cause:

The issue is in hooks/run-hook.cmd line 11:
"C:\Program Files\Git\bin\bash.exe" -l "%~dp0%~1" %2 %3 %4 %5 %6 %7 %8 %9

The -l (login shell) flag causes Git Bash to open a visible terminal window on Windows. This flag appears to be unnecessary for hook execution.

Suggested Fix:

Remove the -l flag from the bash invocation:
"C:\Program Files\Git\bin\bash.exe" "%~dp0%~1" %2 %3 %4 %5 %6 %7 %8 %9

Environment:

  • OS: Windows 11 (also confirmed on Windows 10)
  • Claude Code version: 2.1.9+
  • Superpowers version: 4.0.3
  • Git Bash location: C:\Program Files\Git\bin\bash.exe

Impact:

  • Hook functionality works correctly
  • Terminal window is distracting but can be minimized
  • No data loss or functional issues, purely UX problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions