Build1 distinct publisher3 min readUpdated
A stuck rebase made force-pushing to main the locally correct move. Reviewing agent output scales with what the agent writes; a short list of things it must never do does not.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
A developer who has been running Claude Code as a daily driver for about three months reports that the agent once wanted to force-push to main, and wanted to for a good reason: the rebase was stuck, and force-pushing would have unstuck it [1][2]. The interesting part is the absence of recklessness, because every link in that chain of reasoning was sound, which makes it a locally correct decision with a non-local consequence, the exact category of mistake human code review is worst at catching, since the diff looks fine [3][4]. The author's first response was to read everything: every diff, every command, hand hovering over Ctrl-C [5]. That fails for an arithmetic reason rather than a discipline one, in their account: the cost of reviewing output scales with how much the agent writes, and that number is not going down [6]. So they inverted it and wrote down what the agent must never do, and found the list short enough to fit on a napkin [7][8]. There are six items [9]: a credential read an hour ago inlined into a source file; `git push --force origin main` as the fastest route to a green terminal; `rm -rf "$BUILD_DIR/"` on the one machine where `BUILD_DIR` never got set; a version bump typed straight into `package-lock.json`, because that is the file the version number is visibly in; a failing test quietly growing a `.skip` so CI goes green; and `cat .env` "just to see which variables exist" [10]. None of these require the model to be stupid. Each is a reasonable move by something that cannot see two feet past the command it is about to run [11]. The enforcement point is `PreToolUse`, a hook that fires before any tool call and hands a script the whole payload on stdin, including session id, working directory, tool name, and the command string itself [12]. The script can return a `permissionDecision` of `deny` along with a `permissionDecisionReason` [13]. The part worth stealing is what the author says they found about that reason string: the agent reads it and acts on it [14]. Per their account, saying "blocked" gets you retries with slightly different syntax, while saying "change the manifest and run `pnpm add`" gets compliance on the first try [15]. So every guard they wrote answers two questions rather than one: what is wrong, and what to do instead [16]. The guards are published as `claude-guardrails`, described as zero dependencies, nothing to configure, Node reading a JSON payload and occasionally saying no [17]. The sharpest inversion is about direction of travel. The author started by guarding the write path, then noticed that the write path already has a code review in front of it and the read path has nothing [18]. When an agent runs `cat .env` to check which variables exist, it gets a reasonable answer to a reasonable question, `git diff` stays empty, and every value in that file is now sitting in a transcript, and transcripts get stored, synced, and occasionally pasted into a bug report by someone being helpful [19]. That guard blocks the read and suggests `grep -o "^[A-Z_]*=" .env` instead: same question, answered [20]. The limits show up in the author's own writeup. They wanted a guard that stops an agent editing a migration the database has already run, and hit the fact that a hook has no idea what state your production database is in [21]. That is the boundary of this whole approach: it works where the danger is legible in the command string, and degrades where the danger lives in state the hook cannot inspect. Worth watching whether the deny reason stays a teaching channel or becomes an injection surface, since it is untrusted-adjacent text the model demonstrably acts on [14][15].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The author has been running Claude Code as a daily driver for about three months.
The agent once wanted to force-push to main; the rebase was stuck and force-pushing would have unstuck it.
Every link in the agent's chain of reasoning was sound: it was not careless, hallucinating, or drifting.
The author's initial approach was to read everything: every diff, every command, hand hovering over Ctrl-C.
Instead of reviewing what the agent produces, the author started writing down what it must never do.
The author found the never-do list is short enough to fit on a napkin.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Concrete mechanics, single unverified account
The mechanism-level material is specific and reproducible: an actual PreToolUse stdin payload, the deny response object, the substitute grep command, and two execFileSync git heuristics. Everything rests on one self-published first-person post with no vendor documentation, no second observer, and no measurement of the behavioural claims, so the load-bearing generalisations are weaker than the code snippets.
Author-only deployment
The only observable adoption is the author's own three months of Claude Code use plus publication of claude-guardrails. No stars, downloads, dependents, team rollouts, or third-party reports are supplied, so adoption is effectively a single practitioner.
Thesis outruns the evidence, modestly
The headline thesis — that the deny list rather than the diff is the control point for coding agents — is a general architectural claim extrapolated from one force-push anecdote, an unmeasured scaling argument, and unquantified reports of agent compliance with denial text. The overstatement is modest rather than severe because the post is candid about limits (a hook cannot query the production database), the artefacts are small and verifiable, and no performance or scale numbers are inflated.
Self-published post promoting the author's own tool
The piece is a practitioner post on a self-publishing platform whose narrative arc ends in a link to the author's own claude-guardrails project, giving a clear distribution and credibility incentive. Offsetting factors: the project is described as zero-dependency with nothing to configure, no commercial product, pricing, or sponsor is disclosed in the source, and the post concedes weaknesses in its own approach.
Moderate on mechanics, low on generalisation
Confidence is limited by a single-source, single-publisher cluster with no independent corroboration and no adoption data. It is not lower because the technical artefacts are quoted verbatim and internally consistent, and the author's claims about his own setup are self-verifying in kind even if unreplicated.
build
A memory note is not a gate: blocking credential reads with a PreToolUse hook1 distinct publisher
build
Waku 0.1.0 bets the product is the control plane, not another coding agent1 distinct publisher
build
One event per token: the fix went in the proxy, because that was the only box he owned1 distinct publisher
build
Your reviewing model is reading the diff when it should be reading the session1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 20, 2026