00:00
2026-09-24
somethingbig.ai
ai-agents
Claude Code hooks: reject a broken JSON write before it lands
A Claude Code PreToolUse hook can reject malformed JSON before a Write tool call lands, using a standard-library Python script at .claude/hooks/validate-json-write.py that returns exit code 2 for invaβ¦