<feed xmlns='http://www.w3.org/2005/Atom'>
<title>superpowers.git/hooks, branch viz-launch-script-tweaks</title>
<subtitle>Agentic skills framework and development workflow
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/'/>
<entry>
<title>fix: restore polyglot wrapper to fix Windows hook window spawning</title>
<updated>2026-02-19T17:35:45+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-02-11T02:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=7400d435993dd4b508c09b04a391ba37a976c5e9'/>
<id>7400d435993dd4b508c09b04a391ba37a976c5e9</id>
<content type='text'>
Claude Code spawns hook commands with shell:true + windowsHide:true,
but on Windows the execution chain cmd.exe -&gt; bash.exe causes Git
Bash (MSYS2) to allocate its own console window, bypassing the hide
flag. This creates visible terminal windows that steal focus on every
SessionStart event (startup, resume, clear, compact).

The fix:
- Rename session-start.sh to session-start (no extension) so Claude
  Code's .sh auto-detection regex doesn't fire and prepend "bash"
- Restore run-hook.cmd polyglot wrapper to control bash invocation
  on Windows (tries known Git Bash paths, then PATH, then exits
  silently if no bash found)
- On Unix, the polyglot's shell portion runs the script directly

This avoids Claude Code's broken .sh auto-prepend, gives us control
over how bash is invoked on Windows, and gracefully handles missing
bash instead of erroring.

Addresses: #440, #414, #354, #417, #293
Upstream: anthropics/claude-code#14828
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Claude Code spawns hook commands with shell:true + windowsHide:true,
but on Windows the execution chain cmd.exe -&gt; bash.exe causes Git
Bash (MSYS2) to allocate its own console window, bypassing the hide
flag. This creates visible terminal windows that steal focus on every
SessionStart event (startup, resume, clear, compact).

The fix:
- Rename session-start.sh to session-start (no extension) so Claude
  Code's .sh auto-detection regex doesn't fire and prepend "bash"
- Restore run-hook.cmd polyglot wrapper to control bash invocation
  on Windows (tries known Git Bash paths, then PATH, then exits
  silently if no bash found)
- On Unix, the polyglot's shell portion runs the script directly

This avoids Claude Code's broken .sh auto-prepend, gives us control
over how bash is invoked on Windows, and gracefully handles missing
bash instead of erroring.

Addresses: #440, #414, #354, #417, #293
Upstream: anthropics/claude-code#14828
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Cursor plugin manifest and hook response compatibility</title>
<updated>2026-02-17T19:42:34+00:00</updated>
<author>
<name>ericzakariasson</name>
<email>eric@anysphere.co</email>
</author>
<published>2026-02-13T17:00:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=772ec9f8342ea8f356ff99e469e6b11dd803edb4'/>
<id>772ec9f8342ea8f356ff99e469e6b11dd803edb4</id>
<content type='text'>
Enable native Cursor plugin discovery with a .cursor-plugin manifest, and make the SessionStart hook emit both Cursor and Claude response shapes so context injection works across both platforms. Document Cursor install usage in the README while keeping Claude-first wording.

Co-authored-by: Cursor &lt;cursoragent@cursor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable native Cursor plugin discovery with a .cursor-plugin manifest, and make the SessionStart hook emit both Cursor and Claude response shapes so context injection works across both platforms. Document Cursor install usage in the README while keeping Claude-first wording.

Co-authored-by: Cursor &lt;cursoragent@cursor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make SessionStart hook synchronous so using-superpowers loads before first turn</title>
<updated>2026-02-12T18:57:41+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-02-12T18:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=4c836817da6fe630802180956dd234f2817083b0'/>
<id>4c836817da6fe630802180956dd234f2817083b0</id>
<content type='text'>
When async is true, the hook may not complete before the model starts
responding, meaning the using-superpowers skill instructions aren't
in context for the first message.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When async is true, the hook may not complete before the model starts
responding, meaning the using-superpowers skill instructions aren't
in context for the first message.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: replace O(n^2) escape_for_json with parameter substitution</title>
<updated>2026-02-05T19:38:06+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-02-05T19:38:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=038abed0261784d8232712cb329774fda1d4ed29'/>
<id>038abed0261784d8232712cb329774fda1d4ed29</id>
<content type='text'>
The character-by-character loop using ${input:$i:1} was O(n^2) in
bash due to substring copy overhead. On Windows Git Bash this took
60+ seconds, freezing terminal input even with async hooks.

Replaced with bash parameter substitution (${s//old/new}) which runs
each pattern as a single C-level pass. 7x faster on macOS, expected
to be dramatically faster on Windows Git Bash where the original
caused the worst hangs.

Relates to #404, #413
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The character-by-character loop using ${input:$i:1} was O(n^2) in
bash due to substring copy overhead. On Windows Git Bash this took
60+ seconds, freezing terminal input even with async hooks.

Replaced with bash parameter substitution (${s//old/new}) which runs
each pattern as a single C-level pass. 7x faster on macOS, expected
to be dramatically faster on Windows Git Bash where the original
caused the worst hangs.

Relates to #404, #413
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: run SessionStart hook async to prevent Windows terminal freeze</title>
<updated>2026-02-05T19:33:58+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-02-05T19:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=961052e0f9e5528a2f30a4c1086fdf36e835db9b'/>
<id>961052e0f9e5528a2f30a4c1086fdf36e835db9b</id>
<content type='text'>
The synchronous SessionStart hook blocked the TUI from entering raw
mode on Windows, freezing all keyboard input. The pure-bash
escape_for_json function is O(n^2) on Git Bash, taking 60+ seconds.

Running the hook async prevents the freeze while still injecting
superpowers context. Multiple users confirmed this workaround.

Fixes #404, #413, #414, #419
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The synchronous SessionStart hook blocked the TUI from entering raw
mode on Windows, freezing all keyboard input. The pure-bash
escape_for_json function is O(n^2) on Git Bash, taking 60+ seconds.

Running the hook async prevents the freeze while still injecting
superpowers context. Multiple users confirmed this workaround.

Fixes #404, #413, #414, #419
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Windows hook execution for Claude Code 2.1.x (#331)</title>
<updated>2026-01-23T03:56:52+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-01-22T21:29:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=36fcd576265b93d3a0048ad928c986a4b9bf1af8'/>
<id>36fcd576265b93d3a0048ad928c986a4b9bf1af8</id>
<content type='text'>
* fix: convert shell scripts from CRLF to LF line endings

Add .gitattributes to enforce LF line endings for shell scripts,
preventing bash errors like "/usr/bin/bash: line 1: : command not found"
when scripts are checked out on Windows with CRLF.

Fixes #317 (SessionStart hook fails due to CRLF line endings)

Files converted:
- hooks/session-start.sh
- lib/brainstorm-server/start-server.sh
- lib/brainstorm-server/stop-server.sh
- lib/brainstorm-server/wait-for-feedback.sh
- skills/systematic-debugging/find-polluter.sh

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* fix: update Windows hook execution for Claude Code 2.1.x

Claude Code 2.1.x changed the Windows execution model: it now auto-detects
.sh files in hook commands and prepends "bash " automatically. This broke
the polyglot wrapper because:

  Before: "run-hook.cmd" session-start.sh  (wrapper executes)
  After:  bash "run-hook.cmd" session-start.sh  (bash can't run .cmd)

Changes:
- hooks.json now calls session-start.sh directly (Claude Code handles bash)
- Added deprecation comment to run-hook.cmd explaining the change
- Updated RELEASE-NOTES.md

Fixes #317, #313, #275, #292

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix: convert shell scripts from CRLF to LF line endings

Add .gitattributes to enforce LF line endings for shell scripts,
preventing bash errors like "/usr/bin/bash: line 1: : command not found"
when scripts are checked out on Windows with CRLF.

Fixes #317 (SessionStart hook fails due to CRLF line endings)

Files converted:
- hooks/session-start.sh
- lib/brainstorm-server/start-server.sh
- lib/brainstorm-server/stop-server.sh
- lib/brainstorm-server/wait-for-feedback.sh
- skills/systematic-debugging/find-polluter.sh

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* fix: update Windows hook execution for Claude Code 2.1.x

Claude Code 2.1.x changed the Windows execution model: it now auto-detects
.sh files in hook commands and prepends "bash " automatically. This broke
the polyglot wrapper because:

  Before: "run-hook.cmd" session-start.sh  (wrapper executes)
  After:  bash "run-hook.cmd" session-start.sh  (bash can't run .cmd)

Changes:
- hooks.json now calls session-start.sh directly (Claude Code handles bash)
- Added deprecation comment to run-hook.cmd explaining the change
- Updated RELEASE-NOTES.md

Fixes #317, #313, #275, #292

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Release v3.6.2: Fix Linux compatibility in polyglot hook wrapper</title>
<updated>2025-12-03T18:14:19+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2025-12-03T18:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=154d664373569a83289684d7b01742a82cca4eaf'/>
<id>154d664373569a83289684d7b01742a82cca4eaf</id>
<content type='text'>
Fixed POSIX compatibility issue in hooks/run-hook.cmd that caused
"Bad substitution" errors on Ubuntu/Debian systems where /bin/sh is dash.

Changes:
- Replaced bash-specific ${BASH_SOURCE[0]:-$0} with POSIX-compliant $0
- Tested with both bash and sh (POSIX mode) on macOS
- Updated version to 3.6.2 in all required files

Fixes #141
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed POSIX compatibility issue in hooks/run-hook.cmd that caused
"Bad substitution" errors on Ubuntu/Debian systems where /bin/sh is dash.

Changes:
- Replaced bash-specific ${BASH_SOURCE[0]:-$0} with POSIX-compliant $0
- Tested with both bash and sh (POSIX mode) on macOS
- Updated version to 3.6.2 in all required files

Fixes #141
</pre>
</div>
</content>
</entry>
<entry>
<title>Release v3.6.1: Fix Windows arg forwarding in polyglot wrapper</title>
<updated>2025-12-02T00:18:56+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2025-12-02T00:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=8462c20cce0ca37ff747d80fde4697fd45a98189'/>
<id>8462c20cce0ca37ff747d80fde4697fd45a98189</id>
<content type='text'>
- Add validation for missing script name
- Forward up to 8 additional arguments to bash on Windows
- Fixes CodeRabbit review feedback from #134
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add validation for missing script name
- Forward up to 8 additional arguments to bash on Windows
- Fixes CodeRabbit review feedback from #134
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Windows support for plugin hooks (#134)</title>
<updated>2025-12-01T23:42:12+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2025-12-01T23:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=94e9e2596c7b249eac3ada10c5c56366a57da364'/>
<id>94e9e2596c7b249eac3ada10c5c56366a57da364</id>
<content type='text'>
* feat: Add Windows support for session-start hook

- Create polyglot session-start.cmd that works in both CMD and bash
- Update hooks.json to use the .cmd polyglot launcher
- Replace sed/awk with pure bash for JSON escaping (Windows compatibility)

The polyglot script uses a heredoc trick:
- CMD sees the @echo off block and runs bash.exe with cygpath conversion
- Bash sees a heredoc and skips to the Unix section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Add execute permission to session-start.cmd for Unix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* docs: Add comprehensive polyglot hooks documentation

- Add docs/windows/polyglot-hooks.md explaining the cross-platform technique
- Add reusable run-hook.cmd wrapper for parameterized hook execution
- Document how the polyglot works in CMD vs bash
- Include troubleshooting section and related GitHub issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* test: Add polyglot hook test script for macOS/Linux

Run ./test-polyglot.sh from repo root to verify:
- Required files exist with execute permissions
- Simple wrapper (session-start.cmd) produces valid JSON
- Parameterized wrapper (run-hook.cmd) works
- Heredoc correctly skips CMD block on Unix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Use direct pipe to jq in test to avoid variable escaping issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* refactor: Use single reusable run-hook.cmd for all hooks

- Remove session-start.cmd in favor of run-hook.cmd
- Update hooks.json to use: run-hook.cmd session-start.sh
- Simplify test script to only test run-hook.cmd

This makes it easy to add more hooks - just create the .sh file
and add a line to hooks.json pointing to run-hook.cmd with the script name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Simplify run-hook.cmd CMD block

Pass path directly to bash instead of using cygpath in a subshell.
The complex quoting was causing issues on Windows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* chore: Remove test-polyglot.sh

Testing complete - polyglot hooks work on Windows and macOS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude &lt;noreply@anthropic.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* feat: Add Windows support for session-start hook

- Create polyglot session-start.cmd that works in both CMD and bash
- Update hooks.json to use the .cmd polyglot launcher
- Replace sed/awk with pure bash for JSON escaping (Windows compatibility)

The polyglot script uses a heredoc trick:
- CMD sees the @echo off block and runs bash.exe with cygpath conversion
- Bash sees a heredoc and skips to the Unix section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Add execute permission to session-start.cmd for Unix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* docs: Add comprehensive polyglot hooks documentation

- Add docs/windows/polyglot-hooks.md explaining the cross-platform technique
- Add reusable run-hook.cmd wrapper for parameterized hook execution
- Document how the polyglot works in CMD vs bash
- Include troubleshooting section and related GitHub issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* test: Add polyglot hook test script for macOS/Linux

Run ./test-polyglot.sh from repo root to verify:
- Required files exist with execute permissions
- Simple wrapper (session-start.cmd) produces valid JSON
- Parameterized wrapper (run-hook.cmd) works
- Heredoc correctly skips CMD block on Unix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Use direct pipe to jq in test to avoid variable escaping issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* refactor: Use single reusable run-hook.cmd for all hooks

- Remove session-start.cmd in favor of run-hook.cmd
- Update hooks.json to use: run-hook.cmd session-start.sh
- Simplify test script to only test run-hook.cmd

This makes it easy to add more hooks - just create the .sh file
and add a line to hooks.json pointing to run-hook.cmd with the script name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* fix: Simplify run-hook.cmd CMD block

Pass path directly to bash instead of using cygpath in a subshell.
The complex quoting was causing issues on Windows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

* chore: Remove test-polyglot.sh

Testing complete - polyglot hooks work on Windows and macOS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude &lt;noreply@anthropic.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize superpowers bootstrap to eliminate redundant skill execution</title>
<updated>2025-10-31T17:49:39+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2025-10-31T17:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=8674dc086874dc7ab57d0bbc4e6298a58e26a704'/>
<id>8674dc086874dc7ab57d0bbc4e6298a58e26a704</id>
<content type='text'>
- Update session-start hook to clarify that using-superpowers content is provided directly
- Add explicit guidance to use Skill tool only for other skills
- Prevents confusing loop where agents execute using-superpowers manually
- Reduces overhead and improves user experience

Fixes redundant skill execution in bootstrap workflow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Update session-start hook to clarify that using-superpowers content is provided directly
- Add explicit guidance to use Skill tool only for other skills
- Prevents confusing loop where agents execute using-superpowers manually
- Reduces overhead and improves user experience

Fixes redundant skill execution in bootstrap workflow.
</pre>
</div>
</content>
</entry>
</feed>
