Skip to content

v0.1.25

@jefuriiij jefuriiij tagged this 06 Jun 07:40
The PreToolUse (Moat) bash hook extracted the block `reason` with a greedy
sed capture (\(.*\)"). It over-ran into trailing JSON fields and, since a
block reason legitimately contains quotes (it quotes the query), broke the
deny JSON when embedded raw in the output heredoc — Claude Code received
malformed hookSpecificOutput and silently dropped the deny.

Now reads .decision/.reason with `jq -r '… // empty'` and re-emits the deny
object with `jq -nc --arg`, behind a `command -v jq` guard (silent no-op
when jq is absent) — matching the Stop/Prime hooks fixed in #1. Gate/Moat
decision logic unchanged. Completes the jq migration across all three bash
hooks (last v0.2 item). Smoke-tested end-to-end under bash on Linux.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Assets 2
Loading