Claude Code talk: guardrails move from you to the harness
Anthropic's Lydia Hallie told AI Engineer CODE 2026 that Claude Code users should replace hand-approval with deny rules, sandboxes, hooks and CI.
In a talk posted Nov 11, 2026 on AI Engineer CODE, Lydia Hallie of Anthropic's Claude Code team argued that the old best practices still apply, but the work has moved. The model now steers, auto mode approves, deny rules and the environment restrict, and tests, hooks and CI verify. Your job is to start the work and review what comes out. If you run long or unattended sessions, this is a checklist of what to set up before you walk away. (Hallie re-recorded the talk at home after technical difficulties, and the page notes its transcript is machine-generated.)
Her case rests on Anthropic's own August study: about 14% of people caught a clearly dangerous command, while auto mode blocked 89%. That still lets roughly one in ten through, she said. These are Anthropic's numbers, and BigGo Finance reports them only as cited in the talk. Anthropic's docs say auto mode "reduces permission prompts but does not guarantee safety," per Tahir Nazir's guide.
The practical layers:
- Deny rules for anything you can't take back. A matching deny rule is checked before the classifier ever sees the call. Wrong code can be reverted. A wiped working tree or a key read into the transcript can't.
- A sandbox for side effects. Permissions decide whether
npm testruns, not what its dependencies read once running. The Claude Code docs (Nov 14, 2026) spell out the gaps: aReaddeny on.envcatchescat .envbut not a script that opens the file./sandboxcloses that gap on macOS, Linux and WSL2. - Hooks that actually block. A failing check that exits with code 1 still lets the task count as done. Exit with code 2 to send Claude back. The docs confirm that exit code 2 is what blocks a
Stophook. - A shorter CLAUDE.md. Keep only what Claude can't see in the code. Hallie says capitalised IMPORTANT-style instructions now cause extra tool calls and worse results. The docs list
/doctor prompt-auditto flag lines written for older models.
Our read: the exit-code detail is the one most likely to be silently wrong in your setup today. A verification hook that exits 1 looks like it's working while letting failures through.
Try it: grep your existing hook scripts for how they exit on failure, and switch blocking checks to exit code 2. Then apply Hallie's "can I take it back?" test to every "never" line in your CLAUDE.md. Move each one you couldn't undo into a deny rule, with /sandbox on.
Sources
- Rethinking Claude Code Best Practices | AI Engineer CODE 2026 · ai.engineer
- Anthropic's Lydia Hallie says Claude Code users should stop approving every command: only 14% of humans caught dangerous ones, auto mode blocked 89% — BigGo Finance · BigGo Finance
- Best practices for Claude Code - Claude Code Docs · Claude Code Docs
- Claude Code Auto Mode: Turn It On, Off or Make It Default · Tahir Nazir