SLOPSHOPPER

fnhook-fixture-escape-hatch-unconsulted

Deny-capable module declaring the escape-hatch set but never consulting it

new
A shopper browsing a rack in a slop shop
Source 1 files
hooks/register.ts 15 lines
1import type { Register } from "claude-code";
2
3const READ_ONLY_TOOLS = new Set(["Read", "Grep"]);
4const ESCAPE_HATCH_TOOLS = new Set(["AskUserQuestion", "SendUserMessage"]);
5
6export const register: Register = (on) => {
7  on("classic.PreToolUse", async (_$, e, next) => {
8    const result = await next(e);
9    if (READ_ONLY_TOOLS.has(e.tool)) {
10      return result;
11    }
12    return { deny: "fixture denies everything else" };
13  });
14};
15