Enforcement over Alignment and Steering A developer is building an open-source Claude Code plugin called The Enforcer that uses hooks, schemas and state gates to block disallowed agent actions deterministically rather than relying on prompts, after observing Opus 5.5 try tools at the wrong time, narrate work instead of doing it, and propose unwanted memories. The developer reports accepting only about 1–2% of the agent's memory suggestions and draws the line at enforcing hard requirements while leaving preferences as steering. The account also notes that a PreToolUse:Bash hook blocking a shell command held the boundary but cost time because Claude spent turns explaining why it could not continue instead of recovering. I'm building an open-source Claude Code plugin called The Enforcer . Not because I fancy writing more rules, but because asking a coding agent nicely to behave is clearly not enough. If something must happen, I don't want to cross my fingers and hope the model remembers. I want the system to make the wrong thing hard to do. The usual fix when a coding agent goes off the rails is more prompting. Add a rule. Explain the mistake. Write another skill. Tell it not to do that again. Rinse and repeat. At some point you have to wonder why we're still doing this. I've had Opus 5.5 try tools at the wrong time, narrate the work instead of doing it, and stop to suggest memories nobody asked for. Individually, these sound minor. After enough sessions, you're spending more time supervising the thing than getting on with the work. I'm not interested in how impressive the demo looks. Every release turns up with a fresh round of trust-me-bro benchmarks, Anthropic's included, and none of them tell me how the model behaves halfway through an ordinary day's work. Meanwhile X is full of people showing off one-shot vibe-coded demos that are pretty average to begin with and useless the moment the video ends. I want small, correct changes to a real codebase , and a straight answer about what has and hasn't been tested. Instructions are not an enforcement mechanism Nobody secures a database by writing "please maintain integrity" in the README. We use constraints and transactions. Why are we treating critical agent behaviour any differently? A model can't solve a model's problem. Another prompt just asks the thing that got it wrong to keep an eye on itself. This is a software engineering problem, and we already know how to solve those. We write deterministic code. That's why my harness uses hooks, schemas and state gates. Claude can work out how to do something. It shouldn't get to decide whether a hard rule applies. What enforcement looks like in practice One excerpt shows my PreToolUse:Bash hook refusing a shell command until the required reply had happened. Claude tried again. Same refusal. Once it had replied, the stop hook gave it a pretty clear nudge: "Tools work. Do the work." The boundary held because the tool was blocked, not because Claude suddenly understood the assignment. It also shows the maddening bit: Claude spent turns explaining why it couldn't continue instead of recovering and getting on with it. So the gate did its job and still cost me time. That's the lesson I didn't expect. A hook that blocks the wrong action isn't good enforcement if the agent can't get past it quickly. Enforcement without recovery is just a new way to be annoyed. A good gate needs a clear way through, not a new conversation about the gate. The memory detour Another excerpt has Claude asking to save a fairly ordinary testing observation to memory. I said no. Not because I want auto-memory switched off. I do want to hear the ideas. Every now and then one is worth keeping. But I reckon I accept about 1–2% of the suggestions . The rest are usually details from today's task dressed up as permanent wisdom. Give me the good ones without turning every run into an admin exercise. This one is a different kind of problem, and it's worth being straight about that. Whether a memory is worth keeping is a judgement call. No schema can decide it. What a hook can decide is the mechanical part: nothing gets written to memory without a yes from me. That's the line I'm drawing for the plugin too. Hard requirements get enforced. Preferences stay as steering. If The Enforcer tried to enforce taste, it'd just be a more elaborate prompt. What the harness actually changed The next excerpt isn't about Claude Code hooks at all. CS126 was a piece of work on Ask, the feature in my MakerSketch app where a model does its work through tool calls. It's the same principle at a different boundary. In Claude Code I can only put a gate in front of the tools. In Ask I own the tools the model talks to, so the rules go into the interface itself. The CS126 report is more useful than another polished explanation of how the agent intends to behave. It says seven slices landed, the tool interface changed, and three recorded replays ran. Actual controls were added, rather than another page of instructions. Among the changes: 1. Refusals carry correction. A refused call gets an Error: