Repository navigation
1.1.0
claude-hook-bench run --httprunshttphooks, which were listed and checked but not run: it posts the event's JSON to each hook'surland judges the response as Claude Code does. A 2xx with an empty body is success with no output; a 2xx with a JSON object goes through the same parsing, validation and verdict as a command hook's stdout; a 2xx with any other body, a non-2xx status and a connection failure are non-blocking errors. Header values fill$VARand${VAR}only for the variables the hook lists inallowedEnvVars, and the hook'stimeoutapplies.- It is off by default, because it opens a connection. Without
--httpanhttphook is listed and checked, as before.src/http.mjsis the only file that may open a connection, and only to the hook's ownurl; the README, CONTRIBUTING.md and SECURITY.md say so where they used to say the bench makes no network request. - With
onFailure: "block", a 2xx whose body is neither empty nor a JSON object blocks, as invalid output, which is what the hooks reference says. - "Not verified" says that the response rules follow the hooks reference, not a recording from the binary; that an administrator's
allowedHttpHookUrlsandhttpHookAllowedEnvVarsare not applied; and that a redirect is not followed here. - Contributed by @yoreva-01 in #2, for the good first issue #1. The pull request's tests ran on Windows, macOS and Linux with Node 18 to 24, and the real-binary checks against Claude Code 2.1.312 on Ubuntu and macOS, before the merge.
The next good first issue is #3: a list finding for an http hook whose header uses an environment variable that allowedEnvVars does not list, so the empty header is found before the hook runs.
See the README to set it up, and CHANGELOG.md for every version.