{"slug": "i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3", "title": "I Checked My Agent Setup Against Lydia Hallie's 'Rethinking Claude Code Best Practices': 5 Matches, 3 Gaps, 1 Detour", "summary": "A developer running a small Kubernetes platform built with AI coding agents from Anthropic, OpenAI and Google audited their repository and settings against Lydia Hallie's Claude Code talk \"Rethinking Claude Code Best Practices,\" finding five recommendations already in place, three cheap gaps, and one deliberate divergence. The engineer enforces task-completion claims through git pre-commit hooks rather than Claude Code hooks, and uses cross-vendor reviewers—Anthropic's Fable and Google's Gemini 4 Neon—after finding same-vendor reviewers share blind spots. Hallie cited Anthropic's internal scale at roughly 2,500 changes a day in May rising above 30,000 a day in September.", "body_md": "Lydia Hallie from the Claude Code team at Anthropic gave a talk called [\"Rethinking Claude Code Best Practices\"](https://ai.engineer/talks/vlfCjWuv4es-rethinking-claude-code-best-practices) (ai.engineer, about 17 minutes). Its premise: a year ago you corrected one session at a time, wrote emphatic reminders into `CLAUDE.md`, and either approved every command by hand or skipped permissions entirely. Now developers at Anthropic run dozens of sessions, and the advice has to change with it. She gives the scale inside Anthropic as about 2,500 changes a day in May and more than 30,000 a day in September.\n\nI run a small Kubernetes platform that I build with AI coding agents from three companies: Claude coordinates and verifies, OpenAI's Codex models and Google's Gemini models write code and review it. Since March I've been adding rules every time an agent did something plausible and wrong. So I went through the talk line by line and checked each recommendation against what my repository and settings actually contain. Not what I remember setting up: I opened the files.\n\nThe short version: five of her recommendations I already do in some form; three I don't, and they're cheap; and in one place I ended up somewhere different, for reasons specific to my setup.\n\nThis is the centre of the talk for me. Her example is an API migration: the obvious test is \"login works\", but the check that matters is that an existing login session survives the migration. One prompt, three possible outcomes, and only a check that separates them tells you which one you got. She also asks Claude to show the actual output, because you weren't there to see it.\n\nMy version is an Acceptance block in every task spec: what must be true, what must not be true, and the evidence for each. Two rules came from being burned:\n\nThis week gave me a clean example. I wrote a spec for a capture kit (scripts that probe how Cloudflare's browser SSH behaves), and one rule scored a security control as `pass` when the evidence would actually have shown it was bypassed. It read fine. A reviewer caught it because it asked what the rule does in the failing case, not the passing one.\n\nHer hook example is precise: many test tools exit with code 1 on failure, but a task-completion hook that passes 1 through still lets Claude mark the task complete. It has to return exit code 2 to block.\n\nMy enforcement sits one layer lower, in git. The pre-commit hook refuses a bug document marked `LIVE-VERIFIED` without a well-formed evidence line. It refused my own commit twice this week before I got the line right. That's the point of it: it doesn't care who's committing.\n\nBeing honest about the difference: none of my Claude Code hooks blocks Claude from *declaring* a task done. They inject context (a handoff note after `/clear`, a context-size warning). The git hooks catch the claim at commit time, which is later than her design. I count that as a partial match.\n\nHer model: every pull request gets a fresh-context Claude review, then a separate group of agents double-checks each bug it reported; a small docs or copy edit can proceed on green checks, an ordinary change may need one human reviewer, a risky one two.\n\nMine has a similar shape. Docs and one-line fixes get one reviewer, medium- and high-risk specs a second, blind review. My reviewers are models; the human in the loop is me, checking each finding against the code before it counts.\n\nThe difference is that my second reviewer comes from another company. On this week's spec, Fable (Anthropic) reported 3 blockers and Gemini 4 Neon (Google) reported 5. All three of Fable's were among Neon's, and Neon's two extras were real: a label in my new code would have broken an existing classification test, and the capture header I required contained the host name my own privacy scan blocks, so every capture would have been blocked. A re-review of the fixed spec then found a problem both had missed.\n\nSame-vendor reviewers tend to share blind spots. Mixing vendors is the cheapest diversity I know of.\n\nHer example uses Claude Code Projects (beta): Fable orchestrating, Opus 5.5 in the worker threads. One main session splits the work, starts a thread per task, verifies the results and sends incomplete work back.\n\nMine is a dispatcher script: Claude coordinates, Codex and Gemini workers each get their own git worktree and run ledger, at most three running at once and at most one per file. Same idea, older plumbing, three vendors.\n\nShe points out that local `.env` files, SSH keys and tokens aren't in Git, so a cloud session doesn't have them, and network access beyond package registries and GitHub has to be granted explicitly.\n\nI took that further because my cluster runs on my own hardware. A cloud session has no network path to it at all. It can only ask for a fixed list of read-only actions by committing a request file to a dedicated branch; a bridge on my network reads the branch, runs the allowed action and commits the answer back. Anything that creates or destroys a sandbox waits for me to tap Approve in Slack.\n\nHer test for a deny rule: could you take the action back if Claude got it wrong once? Deny rules run in the harness *before* the auto-mode classifier sees the call, which matters because of a study she showed. In August, 1,053 paid testers each had one dangerous command swapped into a session. About 14% of them spotted it. Auto mode blocked 89% of those commands, and in her words, \"about one in 10 of those commands still went through.\"\n\nI have four deny rules: reading `.env` files, and force push. They're in my **user** settings. The repository's settings file has none. So every cloud session and every fresh checkout gets no deny rules at all, which is exactly the case she commits them to the repo for. Her own example, `git reset --hard`, isn't denied either.\n\nWith the sandbox on, the operating system limits what an approved command like `npm test` can read, write and reach, including the dependency code it runs, and child processes inherit the limits. It covers shell commands and their descendants only: Claude's own file operations, MCP servers and hooks run outside it.\n\nI do sandbox one thing: mutation testing, after a deliberately broken version of a login gate reached a real `sudo` prompt. But Claude Code's own sandbox setting is off, so my everyday test runs (about 3,000 Python tests and the shell suites) run unsandboxed.\n\nHer test per line: could Claude reasonably miss this by reading the project? Keep the legacy dependency the mobile app still uses; drop the stack description and the directions to obvious folders. Newer models follow emphatic reminders too eagerly.\n\nMy project file is mostly things Claude couldn't discover: release caps, the merge gate, what a bug document must contain. But it still has a folder layout section, and the shared file every agent reads still contains \"IMPORTANT ... ALWAYS use the code-review-graph MCP tools BEFORE using Grep/Glob/Read\". That's the style she's describing.\n\nAll three are now on my backlog. The first one is probably fifteen minutes.\n\nHer suggested first experiment: take one thing that's way bigger than you normally give Claude, make sure CI actually catches the things you care about, and see where the session needs you.\n\nI ran something like it before I'd heard the talk. A web-console feature with 11 files and about 35 acceptance checks went out as one dispatch. It stopped three times on holes in my spec and twice on the five-hour usage limit, and it blocked another feature that shared a file. In her terms the experiment worked: it showed me where the session needed me. What I took from it is to split, not to go bigger. A plan with several components now becomes children with no shared file, each with its own acceptance block. This week's capture kit became four: the root-side code to the stronger model, the browser and data sides to the lighter one, the docs to a third.\n\nHer setting differs: one vendor, Projects managing compaction, CI the team already trusts. With three vendors' quotas and workers that have reported commit SHAs that didn't exist, smaller pieces fail smaller.\n\n**Verify before trust.** Workers in my setup have reported test suites they never ran and commits that didn't exist. That's mostly a cross-vendor worker problem, and it's why nothing counts until it's checked against `git`, the GitHub API or a re-run. Her \"show the actual output\" points the same way; mine exists because the output itself has been invented.\n\n**Prove outside behaviour before building on it.** If a fix depends on how an external tool behaves, the spec carries proof from the deployed version: a read-only capture, the upstream source at the tag, or a live probe. This week's capture kit exists because nothing in my web-console design had been tested against Cloudflare's actual browser path.\n\nMost of my extra process exists for one reason: agents from different companies fail in different ways, and some of those failures look exactly like success. The talk reaches the same core from inside one vendor at enormous scale. That two very different setups converge on it is the most reassuring part of the exercise.\n\nThe three gaps are the useful part. Deny rules in the repo, the sandbox for tests, and a shorter `CLAUDE.md` are cheap, and I wouldn't have looked if she hadn't said it out loud.\n\n*The repo: [k3d-manager](https://github.com/wilddog64/k3d-manager).*", "url": "https://wpnews.pro/news/i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3", "canonical_source": "https://dev.to/wilddog64/i-checked-my-agent-setup-against-lydia-hallies-rethinking-claude-code-best-practices-5-matches-13g4", "published_at": "2026-11-28 03:06:28+00:00", "updated_at": "2026-11-28 03:13:32.266356+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Lydia Hallie", "Anthropic", "Claude Code", "OpenAI", "Codex", "Google", "Gemini", "Kubernetes"], "also_reported_by": [], "takeaway": "A task-completion hook must return exit code 2 to block, since passing through exit code 1 still lets Claude mark the task complete; pairing reviewers from different vendors surfaced two real defects that a same-vendor second review missed.", "recommendation": {"advice": "Return exit code 2 from task-completion hooks to actually block completion, and add a blind second review from a different model vendor to catch shared blind spots.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3", "markdown": "https://wpnews.pro/news/i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3.md", "text": "https://wpnews.pro/news/i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3.txt", "jsonld": "https://wpnews.pro/news/i-checked-my-agent-setup-against-lydia-hallie-s-rethinking-claude-code-best-5-3.jsonld"}}