<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/ralph-loop/hooks, branch update-coderabbit-source-url</title>
<subtitle>Official Claude Code plugin directory
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/'/>
<entry>
<title>fix: invoke .sh hooks via bash prefix; add version for cache invalidation</title>
<updated>2026-03-28T15:40:34+00:00</updated>
<author>
<name>Dickson Tsai</name>
<email>dickson@anthropic.com</email>
</author>
<published>2026-03-28T15:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=986deab6a1659ebb998b66962df6f02b20bb884d'/>
<id>986deab6a1659ebb998b66962df6f02b20bb884d</id>
<content type='text'>
Fixes #993 (Permission denied on hook scripts) without relying on
client-side +x preservation.

The hook executor spawns commands via /bin/sh -c, which requires +x
to execute a script directly. Prefixing with bash reads the script
as data — mode bits are irrelevant. This works on all Claude Code
versions, whereas the client-side chmod fix (claude-cli #24666) only
shipped in v2.1.86.

All 3 scripts declare #!/bin/bash and use bashisms ([[ ]], =~), so
bash (not sh) is the correct interpreter.

The version field forces a fresh cache path (1.0.0/ instead of
unknown/), ensuring the new hooks.json reaches users with stale
caches.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #993 (Permission denied on hook scripts) without relying on
client-side +x preservation.

The hook executor spawns commands via /bin/sh -c, which requires +x
to execute a script directly. Prefixing with bash reads the script
as data — mode bits are irrelevant. This works on all Claude Code
versions, whereas the client-side chmod fix (claude-cli #24666) only
shipped in v2.1.86.

All 3 scripts declare #!/bin/bash and use bashisms ([[ ]], =~), so
bash (not sh) is the correct interpreter.

The version field forces a fresh cache path (1.0.0/ instead of
unknown/), ensuring the new hooks.json reaches users with stale
caches.
</pre>
</div>
</content>
</entry>
<entry>
<title>address review: bound grep to tail -n 100; restore explicit error paths</title>
<updated>2026-03-04T00:25:42+00:00</updated>
<author>
<name>sfishman</name>
<email>sfishman@anthropic.com</email>
</author>
<published>2026-03-04T00:25:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=028eccf5447b1f226f5c98a575dad6ee704b2bca'/>
<id>028eccf5447b1f226f5c98a575dad6ee704b2bca</id>
<content type='text'>
- Split pipeline into two steps (extract lines, then parse) mirroring the
  original structure.
- set +e around the jq call so failures reach the $? check instead of
  aborting under set -e.
- The "no text content" branch remains removed (that was the original bug —
  all-tool-use turns now correctly yield empty text and the loop continues).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Split pipeline into two steps (extract lines, then parse) mirroring the
  original structure.
- set +e around the jq call so failures reach the $? check instead of
  aborting under set -e.
- The "no text content" branch remains removed (that was the original bug —
  all-tool-use turns now correctly yield empty text and the loop continues).
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ralph-loop): isolate loop state to the session that started it</title>
<updated>2026-03-02T22:52:00+00:00</updated>
<author>
<name>sfishman</name>
<email>sfishman@anthropic.com</email>
</author>
<published>2026-03-02T22:36:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8644df9ad51fe1dadc5d067e806c3c686efeafff'/>
<id>8644df9ad51fe1dadc5d067e806c3c686efeafff</id>
<content type='text'>
The state file lives at .claude/ralph-loop.local.md — project-scoped,
not session-scoped. The plugin's Stop hook fires in every Claude Code
session open in that project directory. So if session A starts a loop,
session B's Stop events also find the state file and block, feeding A's
prompt into B and consuming A's iteration budget.

This was masked by the transcript-parsing bug fixed in the previous
commit: that bug deleted the state file on the first Stop in any
session, so neither session looped. Fixing it exposed the leak.

Fix: setup writes CLAUDE_CODE_SESSION_ID into the frontmatter; the hook
compares against .session_id from its stdin JSON and exits silently on
mismatch. State files without session_id (written by old setup scripts)
fall through to preserve existing behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The state file lives at .claude/ralph-loop.local.md — project-scoped,
not session-scoped. The plugin's Stop hook fires in every Claude Code
session open in that project directory. So if session A starts a loop,
session B's Stop events also find the state file and block, feeding A's
prompt into B and consuming A's iteration budget.

This was masked by the transcript-parsing bug fixed in the previous
commit: that bug deleted the state file on the first Stop in any
session, so neither session looped. Fixing it exposed the leak.

Fix: setup writes CLAUDE_CODE_SESSION_ID into the frontmatter; the hook
compares against .session_id from its stdin JSON and exits silently on
mismatch. State files without session_id (written by old setup scripts)
fall through to preserve existing behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ralph-loop): stop hook fails when last assistant block is tool_use</title>
<updated>2026-03-02T20:39:50+00:00</updated>
<author>
<name>sfishman</name>
<email>sfishman@anthropic.com</email>
</author>
<published>2026-03-02T20:39:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=adfc3796639cd0c5d892fb05303b4b2cddfe6e12'/>
<id>adfc3796639cd0c5d892fb05303b4b2cddfe6e12</id>
<content type='text'>
Claude Code writes each assistant content block (text/tool_use/thinking)
as its own JSONL line. The hook's `grep role:assistant | tail -1` would
grab whichever block happened to be last — often tool_use — then jq's
text filter returned empty string, triggering the 'no text content' path
which deletes the state file and exits without blocking.

Net effect: the loop silently never fires. In one observed session, 62%
of assistant lines were tool_use-only; the hook deleted state on the
very first Stop event every time.

Fix: slurp all assistant lines with jq -rs, flatten to text blocks only,
take the last. Empty result is now non-fatal — no text means no &lt;promise&gt;
tag, so the loop continues. Also absorbs jq parse errors (control chars
in text) via || fallback instead of aborting under set -e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Claude Code writes each assistant content block (text/tool_use/thinking)
as its own JSONL line. The hook's `grep role:assistant | tail -1` would
grab whichever block happened to be last — often tool_use — then jq's
text filter returned empty string, triggering the 'no text content' path
which deletes the state file and exits without blocking.

Net effect: the loop silently never fires. In one observed session, 62%
of assistant lines were tool_use-only; the hook deleted state on the
very first Stop event every time.

Fix: slurp all assistant lines with jq -rs, flatten to text blocks only,
take the last. Empty result is now non-fatal — no text means no &lt;promise&gt;
tag, so the loop continues. Also absorbs jq parse errors (control chars
in text) via || fallback instead of aborting under set -e.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename ralph-wiggum plugin to ralph-loop per legal guidance (#142)</title>
<updated>2026-01-06T23:22:54+00:00</updated>
<author>
<name>Noah Zweben</name>
<email>noahz@anthropic.com</email>
</author>
<published>2026-01-06T23:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=44328beed48874d8e00da6c4ca5daaa5f0f3183c'/>
<id>44328beed48874d8e00da6c4ca5daaa5f0f3183c</id>
<content type='text'>
- Rename plugin from "ralph-wiggum" to "ralph-loop" to avoid trademark concerns
- Update all internal references to use "Ralph Loop" as the prominent name
- Keep explanatory text noting it "implements the Ralph Wiggum technique" (allowed)
- Rename plugin directory from plugins/ralph-wiggum to plugins/ralph-loop
- Update marketplace.json with new plugin name and source path
- Update plugin-dev documentation references

This change follows legal's recommendation to replace "Wiggum" with "Loop"
in the plugin name while still explaining the technique origin.

Slack thread: https://anthropic.slack.com/archives/C09KU300P7F/p1767741142753959

Co-authored-by: Claude &lt;noreply@anthropic.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Rename plugin from "ralph-wiggum" to "ralph-loop" to avoid trademark concerns
- Update all internal references to use "Ralph Loop" as the prominent name
- Keep explanatory text noting it "implements the Ralph Wiggum technique" (allowed)
- Rename plugin directory from plugins/ralph-wiggum to plugins/ralph-loop
- Update marketplace.json with new plugin name and source path
- Update plugin-dev documentation references

This change follows legal's recommendation to replace "Wiggum" with "Loop"
in the plugin name while still explaining the technique origin.

Slack thread: https://anthropic.slack.com/archives/C09KU300P7F/p1767741142753959

Co-authored-by: Claude &lt;noreply@anthropic.com&gt;</pre>
</div>
</content>
</entry>
</feed>
