Build1 distinct publisher3 min readUpdated
A dev.to post makes a narrow, useful point: agent hooks can read intent, and cost is not a property of intent. The check belongs where the ledger already is.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
A post on dev.to this week takes the standard agent-safety demo apart with two lines of code. The demo is a coding agent that wants to force-push to main because a rebase is stuck, where every step of the reasoning is locally sound and the outcome is non-locally expensive [1]. That case is teachable, the author argues, precisely because the danger is written into the command string, which means a hook can read the text and stop it [2].
Then the counter-example. Two calls to the same refund endpoint, same payment ID, same argument names, same reason code, differing only in the amount field: 4000 and 4000000 GBP, or £40 and £40,000 [3]. Everything a pre-execution hook can read off the text is identical [c3b]. The gap between them is three characters and a factor of 1,000 [4].
The sharper point is that neither call is inherently wrong. According to the author, £40,000 may be a sound refund against a sound invoice, while the £40 one may be a second refund on a payment already refunded an hour earlier, which is arguably the worse failure [5]. Sorting them requires state the caller does not hold: whether the payment has already been refunded in full or in part, whether the merchant's balance covers it or goes negative, how much this actor has already moved today, whether the original payment is under dispute in a way that changes who ends up liable, and whether the payment belongs to this merchant at all [6]. The line worth keeping is the author's: a hook in the agent process can read intent, and cost is not a property of intent [7].
The obvious repair is to let the guard fetch the state itself. The post walks through the bill for that. The agent host now needs read credentials to your ledger in order to protect you from the agent host; refund, dispute and settlement semantics now live in two codebases that must agree indefinitely; and there is a window between the check and the execution where something else lands and yours goes through anyway [8]. What you have built, in the author's phrasing, is a second, worse copy of your authorisation service, running in the least trusted process you own, with a cache [9].
The version that survives, he writes, is boring: the check sits at the rail, at the point of authorisation, because that is the only place that knows what this actor may move, what it has already moved, and what the target looks like right now [10]. The author says his firm is regulated and therefore already had that spine, with every money movement passing an authorisation step with the full picture and an audit record; wiring agents in mostly meant resisting the urge to build something in front of it and call that safety [11]. That is a single-source claim about one shop's architecture, and it is doing a lot of the argument's load.
The hook keeps a job, just a smaller one. In the sample code it classifies rather than decides: if the tool moves money, it calls a preflight on the rail and returns a human confirmation carrying both intent and computed effect [12]. The point of the preflight is that a person sees "this refunds £40,000 against an invoice already refunded in full on the 3rd" instead of "the agent would like to call refund" [13]. The post also states the preflight is explicitly advisory [14].
Worth watching: whether agent frameworks ship hook interfaces that can call back into the system that owns the state, rather than assuming the guard can decide locally, and whether anyone publishes numbers on how often a preflight verdict differs from what the string suggested.
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.
A post circulating this week opens with the author's agent wanting to force-push to main: the rebase was stuck, force-pushing would unstick it, and every step of the reasoning was sound. The post calls this locally correct and non-locally expensive.
The force-push example is teachable because the command carries its own consequence: 'git push --force origin main' has the danger written into it, so it can be pattern-matched, put on a list, and stopped by a hook reading the string.
The post shows two calls to payments.refund with the same paymentId 'pay_9f2c14', currency GBP and reason 'customer_request', differing only in amount: 4000 and 4000000. One is forty pounds, the other forty thousand.
The two refund calls share the same endpoint, argument names, shape and reason code: everything a pre-execution hook can read off the text is the same.
The post argues neither call is inherently wrong: forty thousand might be a good refund against a good invoice, while forty might be a refund on a payment already refunded an hour ago, which in some ways is the worse of the two.
Whether an amount-bearing refund is safe depends on state the caller lacks: whether the payment has already been refunded fully or partially, whether the merchant's balance covers it or goes negative, how much the actor has already moved today, whether the original payment is under dispute (changing who ends up liable), and whether the payment ID even belongs to that merchant.
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.
Self-demonstrating code argument, single source, no external data
The core argument is verifiable by inspection: the two refund calls really are textually identical apart from three characters, and the enumerated missing state (prior refunds, balance, velocity, dispute, ownership) plainly is not present in the call arguments. That makes the reasoning strong on its own terms. But there is exactly one source, an author self-published essay; no incident data, benchmark, third-party review or named organisation supports the wider claim that rail-level enforcement is what survives contact.
One unquantified first-person deployment disclosure
The only adoption signal is the author's statement that his regulated organisation wired agents into a pre-existing authorisation step with audit records. There is no organisation name, no volume, no timeline, no second practitioner report and no vendor or framework adopting the proposed 'come and ask' tool convention — which the author says he has not seen in the MCP spec at all.
Claims kept slightly narrower than the argument supports
The post hedges where hedging is warranted: it calls the preflight explicitly advisory, insists the rail wins on disagreement, credits command-level guards as the right tool for destructive verbs, and downgrades its own hook to a linter. The generalising line — that an agent framework cannot own the safety story for anything that moves money — outruns the single unnamed deployment behind it, but the framing is restrained rather than promotional, so claims sit at or just under what the reasoning supports.
Practitioner advocating his own architecture, self-published
The author writes from inside a regulated money-movement organisation whose existing authorisation spine is the design he recommends, and he links readers to his own earlier post on mandates versus API keys. That is a position-promoting incentive on a self-publishing platform with no editorial layer. Mitigating factors: no product, vendor or pricing is named, competing tooling is credited rather than attacked, and the piece ends with an open question rather than a call to action.
Argument checkable, deployment claim not
Confidence is moderate. The technical mechanism — that a text-reading hook cannot see the state that makes an amount-bearing call safe or catastrophic — is fully inspectable in the supplied source and internally consistent. What cannot be checked from this cluster is the organisational claim, the effectiveness of the classify-and-ask pattern in practice, and whether any convention for declaring un-inferable blast radius exists outside the author's search. One publisher, one voice, no contradicting evidence available.
build
Your first MCP workflow should be a draft queue, not an agent with keys to the inbox1 distinct publisher
build
26 launchd jobs, one log directory: how scheduled automation rots quietly1 distinct publisher
build
Rate limit your MCP servers, because a retrying agent turns one error into a billing incident1 distinct publisher
build
The MCP transport your search results teach has been deprecated since March1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 21, 2026