<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git, branch fix-2159-stop-hook-schema</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>security-guidance: emit schema-valid Stop-hook output (#2159) — 2.0.2 → 2.0.3</title>
<updated>2026-06-02T18:30:11+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-06-02T15:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=70c28b9c2f9e29333443b03fbbdda35e1a0ce878'/>
<id>70c28b9c2f9e29333443b03fbbdda35e1a0ce878</id>
<content type='text'>
Fixes #2159. The Stop hook emits feedback via
`hookSpecificOutput: {hookEventName: "Stop", additionalContext}`, but
`Stop`/`SubagentStop` are NOT members of CC's `hookSpecificOutput`
discriminated union (coreSchemas.ts — valid members are PreToolUse,
PostToolUse, UserPromptSubmit, SessionStart, etc.). So the emitted shape
violates CC's documented hook-output schema.

Impact is CC-version-dependent — important nuance, established empirically:

  - Reporter (array0224-cloud) on CLI 2.1.150 / 2.1.152: CC rejects the
    Stop feedback; the block/reason never reaches the model, so the
    auto-rewake/fix loop is lost. (Detection still runs + logs.)

  - On CLI 2.1.160 (current) the asyncRewake completion path is lenient:
    its gate is `isSyncHookJSONOutput` (hooks.ts) which is just
    `!(json.async === true)` — NOT a strict schema parse. So the invalid
    hookSpecificOutput is tolerated: metrics + rewakeSummary are still
    consumed and the model still receives the findings. I could NOT
    reproduce the rejection on 2.1.160, and BQ confirms Stop-path
    vulns_found metrics are recorded normally (~21k with-vuln fires / 3d),
    i.e. NOT dropped. (An earlier draft of this message claimed metrics
    were dropped — that was wrong; corrected after checking telemetry +
    repro'ing the old plugin on 2.1.160.)

So this is defensive schema-correctness: the plugin should emit output
that conforms to CC's documented union regardless of how strictly a given
CC version validates it. The reporter's environment validates strictly;
relying on the current version's leniency is fragile.

Fix (CC's documented asyncRewake "clean pattern" — hooks.ts: "error text
on stderr, JSON on stdout"):
  - For Stop/SubagentStop, emit_metrics writes guidance to stderr (the
    asyncRewake body channel CC delivers via `stderr || stdout`) and sets
    top-level `decision: "block"` + `reason` (valid SyncHookJSONOutput
    fields; also the documented sync Stop-hook contract for the `-p`
    fallback). It does NOT emit a Stop hookSpecificOutput.
  - PostToolUse (commit-review, push-sweep) is unchanged — valid union
    member, keeps the modern hookSpecificOutput protocol.

Verified locally on macOS Python 3.13:

  - py_compile clean.
  - 11 new tests (test_2159_stop_hook_schema.py) pin the contract: Stop
    output carries no hookSpecificOutput, uses top-level decision/reason,
    writes guidance to stderr; the emitted hookEventName (when present) is
    a valid union member. 2 existing tests that asserted the buggy
    Stop-&gt;hookSpecificOutput shape were corrected. Full suite 464/464
    pass + 2 skipped.

  - END-TO-END in /tmux on CLI 2.1.160:
    * FIXED plugin (2.0.3): staged pickle.loads + os.system, benign edit
      pulls the file into review_set; Stop LLM review found 2 critical
      vulns; CC delivered a clean rewake ("Background security review
      found issues" + both findings). All hooks (UPS, PostToolUse[Edit]
      pattern, PostToolUse[Bash] commit-review, Stop) fired clean; zero
      schema rejections / errors / http_err in the debug log.
    * OLD plugin (2.0.2) on the SAME 2.1.160: also delivered Stop feedback
      (confirming the no-repro-on-latest finding above) — which proves the
      fix carries NO regression risk on current CC while making the output
      robust for the stricter versions where it actually breaks.

Version bumped 2.0.2 -&gt; 2.0.3 per the per-PR-bump policy (#2114: a bump is
the only way the fix reaches the existing fleet — relevant for users still
on the CC versions where this breaks).

Closes #2159.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #2159. The Stop hook emits feedback via
`hookSpecificOutput: {hookEventName: "Stop", additionalContext}`, but
`Stop`/`SubagentStop` are NOT members of CC's `hookSpecificOutput`
discriminated union (coreSchemas.ts — valid members are PreToolUse,
PostToolUse, UserPromptSubmit, SessionStart, etc.). So the emitted shape
violates CC's documented hook-output schema.

Impact is CC-version-dependent — important nuance, established empirically:

  - Reporter (array0224-cloud) on CLI 2.1.150 / 2.1.152: CC rejects the
    Stop feedback; the block/reason never reaches the model, so the
    auto-rewake/fix loop is lost. (Detection still runs + logs.)

  - On CLI 2.1.160 (current) the asyncRewake completion path is lenient:
    its gate is `isSyncHookJSONOutput` (hooks.ts) which is just
    `!(json.async === true)` — NOT a strict schema parse. So the invalid
    hookSpecificOutput is tolerated: metrics + rewakeSummary are still
    consumed and the model still receives the findings. I could NOT
    reproduce the rejection on 2.1.160, and BQ confirms Stop-path
    vulns_found metrics are recorded normally (~21k with-vuln fires / 3d),
    i.e. NOT dropped. (An earlier draft of this message claimed metrics
    were dropped — that was wrong; corrected after checking telemetry +
    repro'ing the old plugin on 2.1.160.)

So this is defensive schema-correctness: the plugin should emit output
that conforms to CC's documented union regardless of how strictly a given
CC version validates it. The reporter's environment validates strictly;
relying on the current version's leniency is fragile.

Fix (CC's documented asyncRewake "clean pattern" — hooks.ts: "error text
on stderr, JSON on stdout"):
  - For Stop/SubagentStop, emit_metrics writes guidance to stderr (the
    asyncRewake body channel CC delivers via `stderr || stdout`) and sets
    top-level `decision: "block"` + `reason` (valid SyncHookJSONOutput
    fields; also the documented sync Stop-hook contract for the `-p`
    fallback). It does NOT emit a Stop hookSpecificOutput.
  - PostToolUse (commit-review, push-sweep) is unchanged — valid union
    member, keeps the modern hookSpecificOutput protocol.

Verified locally on macOS Python 3.13:

  - py_compile clean.
  - 11 new tests (test_2159_stop_hook_schema.py) pin the contract: Stop
    output carries no hookSpecificOutput, uses top-level decision/reason,
    writes guidance to stderr; the emitted hookEventName (when present) is
    a valid union member. 2 existing tests that asserted the buggy
    Stop-&gt;hookSpecificOutput shape were corrected. Full suite 464/464
    pass + 2 skipped.

  - END-TO-END in /tmux on CLI 2.1.160:
    * FIXED plugin (2.0.3): staged pickle.loads + os.system, benign edit
      pulls the file into review_set; Stop LLM review found 2 critical
      vulns; CC delivered a clean rewake ("Background security review
      found issues" + both findings). All hooks (UPS, PostToolUse[Edit]
      pattern, PostToolUse[Bash] commit-review, Stop) fired clean; zero
      schema rejections / errors / http_err in the debug log.
    * OLD plugin (2.0.2) on the SAME 2.1.160: also delivered Stop feedback
      (confirming the no-repro-on-latest finding above) — which proves the
      fix carries NO regression risk on current CC while making the output
      robust for the stricter versions where it actually breaks.

Version bumped 2.0.2 -&gt; 2.0.3 per the per-PR-bump policy (#2114: a bump is
the only way the fix reaches the existing fleet — relevant for users still
on the CC versions where this breaks).

Closes #2159.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bump(amazon-location-service): f16aaf2a → 187edde6 (#2163)</title>
<updated>2026-06-02T14:55:47+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=c7abc99aa1cb2189098dcb7e7128285f6bf9edf4'/>
<id>c7abc99aa1cb2189098dcb7e7128285f6bf9edf4</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(carta-cap-table): f512df80 → 49cfc652 (#2169)</title>
<updated>2026-06-02T14:54:33+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=3a0bba1d810f71a816d9feb22c5d6ff02fb579fa'/>
<id>3a0bba1d810f71a816d9feb22c5d6ff02fb579fa</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(chrome-devtools-mcp): 2e039c09 → 692b28ad (#2171)</title>
<updated>2026-06-02T14:53:19+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=c326beefc408dc6727189c072244c3cf93a62c80'/>
<id>c326beefc408dc6727189c072244c3cf93a62c80</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(datarobot-agent-skills): 4c3dfbd2 → 1bef2843 (#2172)</title>
<updated>2026-06-02T14:52:06+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:52:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=cc8231f0e8ae314ba8d0b3f4778d319035d093e8'/>
<id>cc8231f0e8ae314ba8d0b3f4778d319035d093e8</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(cds-mcp): 92dc99f5 → 9658cea9 (#2129)</title>
<updated>2026-06-02T14:50:52+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=768c45f7c7326b99fa565348d6f04b2dec3167c2'/>
<id>768c45f7c7326b99fa565348d6f04b2dec3167c2</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(huggingface-skills): df627be1 → 49abf82b (#2138)</title>
<updated>2026-06-02T14:47:11+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=890215ba95165b5c50efa4feb24b64eb1dd41589'/>
<id>890215ba95165b5c50efa4feb24b64eb1dd41589</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(quarkus-agent): 32cad78b → 065b4595 (#2144)</title>
<updated>2026-06-02T14:44:02+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=77c7b714966e8ce87bbc4483394e4867288d6714'/>
<id>77c7b714966e8ce87bbc4483394e4867288d6714</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(aws-amplify): f16aaf2a → 187edde6 (#2165)</title>
<updated>2026-06-02T14:40:50+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=8e3e55e5129287a372af1d0557d59f99afdf2ebc'/>
<id>8e3e55e5129287a372af1d0557d59f99afdf2ebc</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bump(aws-serverless): f16aaf2a → 187edde6 (#2166)</title>
<updated>2026-06-02T14:39:37+00:00</updated>
<author>
<name>github-actions[bot]</name>
<email>41898282+github-actions[bot]@users.noreply.github.com</email>
</author>
<published>2026-06-02T14:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a8c0b70061f8ac1d916989bb0c90773e2f33cf96'/>
<id>a8c0b70061f8ac1d916989bb0c90773e2f33cf96</id>
<content type='text'>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
</feed>
