<feed xmlns='http://www.w3.org/2005/Atom'>
<title>superpowers.git/hooks/session-start, branch dev</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(hooks): start no child processes in the SessionStart hook (#2081)</title>
<updated>2026-10-22T21:16:09+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-10-22T21:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=328685babd94e11910516025dee12e32a6d49de1'/>
<id>328685babd94e11910516025dee12e32a6d49de1</id>
<content type='text'>
On Windows, Git Bash emulates fork(), so every command substitution and
pipe costs tens of milliseconds. The SessionStart hook runs on every
startup, /clear and compaction, and on dev it forked six times: the
$(cd ... &amp;&amp; pwd) in run-hook.cmd and twice in session-start,
$(escape_for_json ...), and printf | cat.

Resolve paths with parameter expansion, read the skill with the read
builtin, have escape_for_json assign a variable, and absorb EPIPE with
trap '' PIPE plus printf 2&gt;/dev/null || true instead of piping through
cat. The cat pipe also turned an early-closed stdout into exit 141 under
pipefail; the new emit_json exits 0 there.

Measured on Windows 11 (VM, Git Bash 5.2), 21 interleaved runs of
run-hook.cmd session-start: median 116 ms before, 46 ms after, against a
25 ms floor for one bash start (the wrapper starts two). Claude Code
2.1.308 logged the hook at 181-421 ms before and 137-146 ms after. Output
is byte-identical to dev across all five output shapes, two working
directories, normal and empty PATH, direct and through the wrapper (40/40
on Linux), and its sha256 matches on Windows.

Tests: the cat-stub case, which asserted the pipe, is replaced by a
closed-stdout case, and a new case counts process creations with strace
on Linux (5 in session-start and 6 through the wrapper on dev, 0 after).

Co-authored-by: willow &lt;willowite@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows, Git Bash emulates fork(), so every command substitution and
pipe costs tens of milliseconds. The SessionStart hook runs on every
startup, /clear and compaction, and on dev it forked six times: the
$(cd ... &amp;&amp; pwd) in run-hook.cmd and twice in session-start,
$(escape_for_json ...), and printf | cat.

Resolve paths with parameter expansion, read the skill with the read
builtin, have escape_for_json assign a variable, and absorb EPIPE with
trap '' PIPE plus printf 2&gt;/dev/null || true instead of piping through
cat. The cat pipe also turned an early-closed stdout into exit 141 under
pipefail; the new emit_json exits 0 there.

Measured on Windows 11 (VM, Git Bash 5.2), 21 interleaved runs of
run-hook.cmd session-start: median 116 ms before, 46 ms after, against a
25 ms floor for one bash start (the wrapper starts two). Claude Code
2.1.308 logged the hook at 181-421 ms before and 137-146 ms after. Output
is byte-identical to dev across all five output shapes, two working
directories, normal and empty PATH, direct and through the wrapper (40/40
on Linux), and its sha256 matches on Windows.

Tests: the cat-stub case, which asserted the pipe, is replaced by a
closed-stdout case, and a new case counts process creations with strace
on Linux (5 in session-start and 6 through the wrapper on dev, 0 after).

Co-authored-by: willow &lt;willowite@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): make SessionStart hooks resolve without external PATH lookups (#2349)</title>
<updated>2026-09-26T19:48:28+00:00</updated>
<author>
<name>ada-sen</name>
<email>ada.sen@primeradiant.com</email>
</author>
<published>2026-09-26T19:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=0a8cefe3e3db5c9abd9ebe11b836b829baad1466'/>
<id>0a8cefe3e3db5c9abd9ebe11b836b829baad1466</id>
<content type='text'>
* fix(hooks): make SessionStart hooks resolve without external PATH lookups

SessionStart:startup hooks can run before Claude Code's PATH is repaired
(anthropics/claude-code#43127), or ahead of a sibling PATH-fixing hook in
the same startup batch. hooks/session-start and the Unix half of
hooks/run-hook.cmd both shelled out to dirname, cat, and a PATH lookup for
bash itself, so an empty PATH made every SessionStart hook fail outright:

  hooks/session-start: line 7: dirname: command not found
  hooks/session-start: line 44: cat: command not found

None of those external calls are necessary:
- ${0%/*} replaces $(dirname "$0") for both scripts.
- ${BASH:-bash} replaces a bare 'bash' in run-hook.cmd's exec — bash always
  sets $BASH to its own absolute path once running, so no PATH lookup is
  needed to re-invoke it.
- $(&lt;file) (a bash builtin) replaces 'cat file' for reading the skill body.
- The trailing '| cat' after each printf branch was a no-op pass-through
  through another external binary; removed.

Adds a regression test in tests/hooks/test-session-start.sh that invokes
both hooks under an empty PATH.

Fixes #2310.

* Split $0 on / or \ so cmd-dispatched hooks find the plugin root

run-hook.cmd's Windows half starts bash with a backslash path
(C:\...\hooks\session-start). ${0%/*} found no slash there, so
session-start resolved the wrong plugin root and injected 'Error
reading using-superpowers skill' instead of the skill. MSYS dirname
handled backslashes, so dev was fine. Seen on Windows 11 + Git Bash
5.2.37 via cmd /c run-hook.cmd session-start.

---------

Co-authored-by: Jesse Vincent &lt;jesse@primeradiant.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix(hooks): make SessionStart hooks resolve without external PATH lookups

SessionStart:startup hooks can run before Claude Code's PATH is repaired
(anthropics/claude-code#43127), or ahead of a sibling PATH-fixing hook in
the same startup batch. hooks/session-start and the Unix half of
hooks/run-hook.cmd both shelled out to dirname, cat, and a PATH lookup for
bash itself, so an empty PATH made every SessionStart hook fail outright:

  hooks/session-start: line 7: dirname: command not found
  hooks/session-start: line 44: cat: command not found

None of those external calls are necessary:
- ${0%/*} replaces $(dirname "$0") for both scripts.
- ${BASH:-bash} replaces a bare 'bash' in run-hook.cmd's exec — bash always
  sets $BASH to its own absolute path once running, so no PATH lookup is
  needed to re-invoke it.
- $(&lt;file) (a bash builtin) replaces 'cat file' for reading the skill body.
- The trailing '| cat' after each printf branch was a no-op pass-through
  through another external binary; removed.

Adds a regression test in tests/hooks/test-session-start.sh that invokes
both hooks under an empty PATH.

Fixes #2310.

* Split $0 on / or \ so cmd-dispatched hooks find the plugin root

run-hook.cmd's Windows half starts bash with a backslash path
(C:\...\hooks\session-start). ${0%/*} found no slash there, so
session-start resolved the wrong plugin root and injected 'Error
reading using-superpowers skill' instead of the skill. MSYS dirname
handled backslashes, so dev was fine. Seen on Windows 11 + Git Bash
5.2.37 via cmd /c run-hook.cmd session-start.

---------

Co-authored-by: Jesse Vincent &lt;jesse@primeradiant.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Explain why session-start pipes printf through cat</title>
<updated>2026-09-26T19:11:21+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-09-26T19:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=f5f695329400a98ad3db7d5e6c5878da4c2091ee'/>
<id>f5f695329400a98ad3db7d5e6c5878da4c2091ee</id>
<content type='text'>
Three open PRs (#2115, #2349, #2367) removed the | cat pipes as
no-op subprocess spawns, which would bring back the Windows EPIPE
diagnostic fixed in d72560e (#1612). Say so next to the code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Three open PRs (#2115, #2349, #2367) removed the | cat pipes as
no-op subprocess spawns, which would bring back the Windows EPIPE
diagnostic fixed in d72560e (#1612). Say so next to the code.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Muse SessionStart hook must use nested hookSpecificOutput</title>
<updated>2026-09-17T23:22:05+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-09-17T23:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=abf67452f89434916a35b2a26530bfb446ad5ac5'/>
<id>abf67452f89434916a35b2a26530bfb446ad5ac5</id>
<content type='text'>
muse-spark-1.3-contributor rejects top-level additionalContext on
SessionStart ("unsupported additionalContext in output"). Switch Muse
branch to Claude-style nested {hookSpecificOutput:{hookEventName,
additionalContext}} which validates and injects correctly (tested via
muse exec --provider meta hello world -&gt; success, no hook failed).

Co-Authored-By: Muse Spark
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
muse-spark-1.3-contributor rejects top-level additionalContext on
SessionStart ("unsupported additionalContext in output"). Switch Muse
branch to Claude-style nested {hookSpecificOutput:{hookEventName,
additionalContext}} which validates and injects correctly (tested via
muse exec --provider meta hello world -&gt; success, no hook failed).

Co-Authored-By: Muse Spark
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: add native Muse support (multiprovider)</title>
<updated>2026-09-17T22:55:44+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-09-17T22:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=d2112a41561b4af9b6b75c0ae9de8b90ea5e9898'/>
<id>d2112a41561b4af9b6b75c0ae9de8b90ea5e9898</id>
<content type='text'>
Add .muse-plugin/plugin.json (native Muse contract, 16 skills,
SessionStart hook) and marketplace.json so the same repo now serves
Muse alongside Claude Code, Codex, Cursor, Gemini, Pi, etc.

- skills/using-superpowers/references/muse-tools.md: Muse tool mapping
- skills/using-superpowers/SKILL.md: list Muse in Platform Adaptation
- hooks/session-start: handle MUSE_PLUGIN_ROOT (SDK standard
  additionalContext) alongside CURSOR/CLAUDE/COPILOT branches
- .version-bump.json: track .muse-plugin/plugin.json and marketplace
- README.md: add Muse to TOC and Installation with muse plugins install
  instructions
- AGENTS.md: convert symlink -&gt; regular file copy to satisfy Muse
  validator (symlink entries rejected as installable)

Validated: muse plugins validate =&gt; valid:true (diagnostics=1 for
expected multiple-manifests warning), all 16 skills validate true.

Co-Authored-By: Muse Spark
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add .muse-plugin/plugin.json (native Muse contract, 16 skills,
SessionStart hook) and marketplace.json so the same repo now serves
Muse alongside Claude Code, Codex, Cursor, Gemini, Pi, etc.

- skills/using-superpowers/references/muse-tools.md: Muse tool mapping
- skills/using-superpowers/SKILL.md: list Muse in Platform Adaptation
- hooks/session-start: handle MUSE_PLUGIN_ROOT (SDK standard
  additionalContext) alongside CURSOR/CLAUDE/COPILOT branches
- .version-bump.json: track .muse-plugin/plugin.json and marketplace
- README.md: add Muse to TOC and Installation with muse plugins install
  instructions
- AGENTS.md: convert symlink -&gt; regular file copy to satisfy Muse
  validator (symlink entries rejected as installable)

Validated: muse plugins validate =&gt; valid:true (diagnostics=1 for
expected multiple-manifests warning), all 16 skills validate true.

Co-Authored-By: Muse Spark
</pre>
</div>
</content>
</entry>
<entry>
<title>Pipe SessionStart hook printf through cat to absorb EPIPE on Windows</title>
<updated>2026-06-16T17:09:44+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-05-23T23:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=d72560e462a74e10d161b7f993d5fc3282bfa1e2'/>
<id>d72560e462a74e10d161b7f993d5fc3282bfa1e2</id>
<content type='text'>
On Windows + Git Bash, the SessionStart hook prints a confusing
diagnostic at every startup ("printf: write error: Permission denied")
when Claude Code closes the hook's stdout pipe before the printf has
finished writing. The hook still runs to completion and context still
gets injected, but the diagnostic surfaces every session because
Git Bash's printf reports EPIPE as "Permission denied" (not "Broken
pipe" like Linux) and our `set -euo pipefail` lets that error escape.

Piping each printf through `cat` makes the external cat process the
recipient of any SIGPIPE / EPIPE. cat's failure does not propagate to
the parent bash under pipefail because cat is the last command in the
pipeline and exits cleanly when the pipe stays open long enough to
hold the data. On macOS/Linux the cat passthrough is transparent (no
behavior change, no measurable cost).

Verified:
- Existing tests/hooks/test-session-start.sh: 7/7 pass on macOS
- Manual run on Windows 11 + Git Bash 5.2 + Node 22 produces valid JSON,
  clean stderr, and exit 0
- JSON output is byte-identical to the unpatched hook

Reported by @silvertakana in #1612, attribution preserved in the
Co-authored-by trailer below — this is the same fix shape the original
PR proposed.

Co-authored-by: silvertakana &lt;silvertakana@users.noreply.github.com&gt;
Closes #1612.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows + Git Bash, the SessionStart hook prints a confusing
diagnostic at every startup ("printf: write error: Permission denied")
when Claude Code closes the hook's stdout pipe before the printf has
finished writing. The hook still runs to completion and context still
gets injected, but the diagnostic surfaces every session because
Git Bash's printf reports EPIPE as "Permission denied" (not "Broken
pipe" like Linux) and our `set -euo pipefail` lets that error escape.

Piping each printf through `cat` makes the external cat process the
recipient of any SIGPIPE / EPIPE. cat's failure does not propagate to
the parent bash under pipefail because cat is the last command in the
pipeline and exits cleanly when the pipe stays open long enough to
hold the data. On macOS/Linux the cat passthrough is transparent (no
behavior change, no measurable cost).

Verified:
- Existing tests/hooks/test-session-start.sh: 7/7 pass on macOS
- Manual run on Windows 11 + Git Bash 5.2 + Node 22 produces valid JSON,
  clean stderr, and exit 0
- JSON output is byte-identical to the unpatched hook

Reported by @silvertakana in #1612, attribution preserved in the
Co-authored-by trailer below — this is the same fix shape the original
PR proposed.

Co-authored-by: silvertakana &lt;silvertakana@users.noreply.github.com&gt;
Closes #1612.
</pre>
</div>
</content>
</entry>
<entry>
<title>[codex] support native Codex plugin hooks (#1540)</title>
<updated>2026-06-16T17:09:44+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@ritter.dev</email>
</author>
<published>2026-05-14T22:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=1e7cd987d3e0ca8fa3ab52d75f4e658e46694a3a'/>
<id>1e7cd987d3e0ca8fa3ab52d75f4e658e46694a3a</id>
<content type='text'>
* docs: specify Codex native hooks parity

* docs: refine Codex hooks spec after review

* docs: record Codex hook contract spike

* docs: plan Codex native hooks implementation

* feat: support Codex native plugin hooks

* test: add Codex native hook drill coverage

* Simplify Codex hook entrypoint</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* docs: specify Codex native hooks parity

* docs: refine Codex hooks spec after review

* docs: record Codex hook contract spike

* docs: plan Codex native hooks implementation

* feat: support Codex native plugin hooks

* test: add Codex native hook drill coverage

* Simplify Codex hook entrypoint</pre>
</div>
</content>
</entry>
<entry>
<title>fix: add Copilot CLI platform detection for sessionStart context injection</title>
<updated>2026-03-31T18:51:22+00:00</updated>
<author>
<name>Blaž Čulina</name>
<email>culina.blaz@nsoft.com</email>
</author>
<published>2026-03-25T21:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=a2964d7a20b8d9fefafc14ded4b5416dd1d4246e'/>
<id>a2964d7a20b8d9fefafc14ded4b5416dd1d4246e</id>
<content type='text'>
Copilot CLI v1.0.11 reads `additionalContext` from sessionStart hook
output, but the session-start script only emits the Claude Code-specific
nested format. Add COPILOT_CLI env var detection so Copilot CLI gets the
SDK-standard top-level `additionalContext` while Claude Code continues
getting `hookSpecificOutput`.

Based on PR #910 by @culinablaz.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Copilot CLI v1.0.11 reads `additionalContext` from sessionStart hook
output, but the session-start script only emits the Claude Code-specific
nested format. Add COPILOT_CLI env var detection so Copilot CLI gets the
SDK-standard top-level `additionalContext` while Claude Code continues
getting `hookSpecificOutput`.

Based on PR #910 by @culinablaz.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: add Cursor-compatible hooks and fix platform detection</title>
<updated>2026-03-15T19:35:18+00:00</updated>
<author>
<name>jesse</name>
<email>jesse@magic-kingdom</email>
</author>
<published>2026-03-15T19:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=4e7c0842f899e6a9b7f04c78b34068008dbffc39'/>
<id>4e7c0842f899e6a9b7f04c78b34068008dbffc39</id>
<content type='text'>
Add hooks/hooks-cursor.json with Cursor's camelCase format (sessionStart,
version: 1) and update .cursor-plugin/plugin.json to reference it. Uses
${CURSOR_PLUGIN_ROOT} and run-hook.cmd for cross-platform support.

Fix session-start platform detection: check CURSOR_PLUGIN_ROOT first
(Cursor may also set CLAUDE_PLUGIN_ROOT), ensuring correct output format
for each platform.

Based on PR #709 with fixes for: wrong filename (.sh extension), missing
Windows support, fragile relative paths, and incorrect platform detection.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add hooks/hooks-cursor.json with Cursor's camelCase format (sessionStart,
version: 1) and update .cursor-plugin/plugin.json to reference it. Uses
${CURSOR_PLUGIN_ROOT} and run-hook.cmd for cross-platform support.

Fix session-start platform detection: check CURSOR_PLUGIN_ROOT first
(Cursor may also set CLAUDE_PLUGIN_ROOT), ensuring correct output format
for each platform.

Based on PR #709 with fixes for: wrong filename (.sh extension), missing
Windows support, fragile relative paths, and incorrect platform detection.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): replace heredoc with printf to fix bash 5.3+ hang</title>
<updated>2026-03-15T19:14:34+00:00</updated>
<author>
<name>jesse</name>
<email>jesse@magic-kingdom</email>
</author>
<published>2026-03-15T19:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=537ec640fd8fd47fc0ff596abeb445d1515bd2bd'/>
<id>537ec640fd8fd47fc0ff596abeb445d1515bd2bd</id>
<content type='text'>
Bash 5.3 has a regression where heredoc variable expansion blocks when
content exceeds ~512 bytes. The session_context variable is ~4,500 bytes,
causing the SessionStart hook to hang indefinitely on macOS with Homebrew
bash 5.3+. Replace cat &lt;&lt;EOF with printf.

Tested on Linux (bash 5.2) and Windows (Git Bash 5.2). The hang only
affects 5.3+ but printf works correctly on all versions.

Based on #572, closes #572. Fixes #571.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bash 5.3 has a regression where heredoc variable expansion blocks when
content exceeds ~512 bytes. The session_context variable is ~4,500 bytes,
causing the SessionStart hook to hang indefinitely on macOS with Homebrew
bash 5.3+. Replace cat &lt;&lt;EOF with printf.

Tested on Linux (bash 5.2) and Windows (Git Bash 5.2). The hang only
affects 5.3+ but printf works correctly on all versions.

Based on #572, closes #572. Fixes #571.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
