A refund agent has one rule in its prompt: never approve above 200 without sign-off. Nobody changes the rule. Six weeks later a 340 refund goes through with no sign-off, and the incident review produces a longer sentence in the prompt. The rule was written down. It was never a decision the system could make.
That distinction is the whole story. A sentence in a prompt is a preference expressed to a model. An enforced rule is a branch in code that the run has to pass through. They look identical in the design doc and behave completely differently at 2 a.m.
This is about the second one. Not about making the model more careful.
Three questions a prompt cannot answer
Take any rule your agent is supposed to follow and ask these three things. The answers are what separate an instruction from a control.
Which version was live? If the rule changed last month, can you produce the version that was in force on the failing run? A prompt edit leaves no diff you can assert against. A versioned rule in code does.
Where is the state that proves it ran? "The agent was told to check" is not a state. If the run record has no field that was set by the check, the check did not participate in the decision. It only participated in the explanation.
Who decided to allow the action? If the answer is "the model agreed it was fine," the permission check was an opinion. A caller either may read this document or may not. That has a factual answer and does not belong in a probability distribution.
Most postmortems I have read stop at one of these. The fix is usually a bigger sentence. A bigger sentence changes none of the three answers.
The boundary belongs in the backbone
There is a name for the arrangement that answers all three. A deterministic backbone owns state, retries, authorization, audit trails and rollback. The model is invoked only at nodes that genuinely require semantic judgement: does this passage answer the question, is this reply adequate, do these two reports describe the same thing. The backbone decides what happens next. The model decides what a thing means.
The important word is owns, not supports. A backbone that recommends an authorization decision is still a prompt with extra steps. The check has to sit on the path between a request and the data, so a request that fails it never reaches a model output that could be mistaken for consent. The logic is small enough to state plainly:
on access(request):
allowed = policy.allows(
subject = request.actor,
tenant = request.tenant,
resource = request.resource
)
if not allowed:
audit(decision="deny", reason_code=policy.why(), policy_version=POLICY_VERSION)
return 403
audit(decision="allow", reason_code="OK", policy_version=POLICY_VERSION)
Every decision writes seven fields: who, tenant, resource, decision, reason_code, policy_version and timestamp. That record is what makes an older decision reconstructable. The code above is the shape of the check, not an API.
That last point is where most designs are lighter than they look. Ask the system to attempt the read it should deny. If you get a polite refusal written by the model, you have a suggestion. If you get a 403 from the access layer plus an audit event with a reason code, you have a gate. Both read well in a demo. Only one survives an incident review.
One experiment that tells you which one you built
Pick a single decision your agent made recently that someone questioned. Then run three checks on it.
Change the rule behind the decision. If the change takes effect everywhere at once, with no stale copy still serving the old answer, your state has one authority. If it takes effect in the editor but not in the published endpoint, your publish step is copying some things and forgetting others. A model cannot reconcile two authorities. It can only explain the discrepancy fluently.
Then ask for the record. You should be able to produce, from stored artifacts, the rule version, the inputs, the model output, and the system's acceptance decision. If the answer depends on someone remembering what the prompt said last week, the decision was never auditable. It was only memorable.
Finally, inject the negative case. Send the request with a caller identity that should be denied, with a header that claims more privilege than the caller has, and straight at the internal endpoint that bypasses the conversational path. Assert three things every time: a 403 from the gate, an audit entry that names the rule and the reason, and zero bytes of the protected record in the response. A gate that has never been given a bad input is not a gate. It is a shape that looks like one.
The third check is the one people skip, because the happy path already works. All three reduce to a table you can run before release:
| Check | Evidence it passed | What a prompt-only version gives you |
|---|---|---|
| Rule version | A versioned artifact, no stale copy still serving the old answer | "The prompt says so" |
| Stored record | Inputs, model output and acceptance decision rebuilt from stored artifacts | Someone remembering what the prompt said last week |
| Negative case | 403 from the gate, an audit entry naming rule and reason, zero protected bytes returned | A polite refusal written by the model |
What this costs, and what it doesn't buy
It costs more to build. Versioned rules, one state authority, a replayable record and a real rollback are work. For a prototype with no users and no sensitive writes, a single model call with a careful prompt is the honest choice. This structure earns its cost when a wrong decision has to be explained later, or undone.
It also does not make the system correct. A backbone can enforce a wrong rule perfectly well, and the model can still misjudge meaning at the nodes where it is allowed to. What it gives you is controllability, auditability and fallbacks: the ability to say which node failed, which rule was active, and what the system accepted. That is a different claim from "the output will be right," and it is worth being precise about which one you are making.
There is a failure mode of its own, too. A backbone so rigid that the model's judgment is ignored at the nodes that needed it. Then you have built a workflow and are paying a model to decorate it.
The question I'll leave you with
Look at the last rule someone asked you to tighten in your agent. Was the change a sentence in a prompt, or a versioned artifact with a check that could reject a malformed version of it? If a policy document fails to parse at 2 a.m., which line of the run record would show that the rule was evaluated, and would the request still have advanced?
No tool to sell, no link to click. Just this: a rule that only exists in prose is a rule you have not built yet.
Top comments (14)
The $340 refund going through after six weeks is the perfect illustration — the rule was a sentence in a prompt, and a sentence is a preference, not a control. Your three questions (which version was live, where's the state proving it ran, who decided) should be taped to every agent design doc. One pushback: for genuinely semantic decisions — 'is this reply adequate' — do you keep the model in the loop as a judge, or does the backbone still own the final call?
The denial test is the right first check, and it is one-sided in a way that matters: a gate that refuses everything passes it perfectly.
So run the mirror of it. Attempt a read that should be allowed, through the same access layer, and confirm it succeeds and produces an audit event with a reason code. If the audit log only contains denials, you cannot distinguish a working gate from an over-blocking one - both produce a clean denial record, and only one of them lets the product function.
The tell is cheap: count allowed events alongside denied events in the same window. A gate with zero allows is not stricter, it is untested, and it will be discovered by a user rather than by you.
"A sentence in a prompt is a preference; an enforced rule is a branch the run has to pass through" is the clearest way I've seen this put. The refund example is perfect, because the longer prompt sentence after the incident changes nothing about the next one.
Fully agree that a sentence in a prompt is a preference, not a control. One addition from the API side: the refund limit belongs in the same place as object-level authorization. The service that executes the refund checks the amount and the approver no matter who called it, agent or human. The prompt can still mention the rule, but only as a hint to avoid wasted calls, never as the enforcement. Do you version these rules with the code or keep them in a separate policy store?
The $340 refund is the right example. The rule was a sentence, and the run had no branch it had to pass through, so nothing stopped it. I build Aladdin, a job agent, and the same split is why the ask is a gate, not a prompt line. A fresh worker reads the actual form, and if an answer is not clearly covered by the user's own facts, the run stops and asks the user. There is no path forward without that answer, so the model cannot talk its way past it. Your third check is the one I would steal. The negative case is the only test that proves the gate exists.
The negative-case check is the one I'd steal — a polite refusal from the model reads exactly like a gate in a demo, and a 403 with an audit event is the only thing that survives an incident review. The version question is the one that would have caught me though. If you can't produce the rule version that was live on the failing run, you're not debugging, you're storytelling. Do you version the prompt text the same way, or is that the one artifact that stays unversioned?
The three questions are the right test, but I would push on the second one. "Where is the state that proves it ran" assumes the stored record tells the truth, and I watched a stored record lie last week: a test log said 7 of 12 passing while the patch on disk held 5. The log was written by the same run it was supposed to check. So the audit event proves a check ran, but who checks the thing that writes the audit event? Your negative-case test is still the strongest part. A 403 plus an audit entry with a reason code is the only answer in the piece that cannot be faked by fluent prose.
Same thing happened to us in October. "A question changes nothing" was a bullet in our agent's system prompt, and it held until we added one sentence to a tool description. That sentence was read as a change request, and a question about the page saved a new version of it. The fix that stuck took the decision out of the prompt: a triage call sets a changes_page boolean before the first turn, and when it's false the runner only offers read-only tools and reply. In a scripted test where the model tries edit_file anyway, it gets "Unknown tool". The prompt bullet is still there, but only for the case where the triage call fails.
A small one from our release process, with your second question in it. Our version number lives in six files. In August it drifted across four of them and two publishes in a row failed, after the merge, where no PR check could see it. So we built a hook: one command bumps all six. Four days later the number was bumped by hand at all six places anyway. The hook worked. The only pointer to it was a comment in the script's header, which you read once you've already found the script. Ours is still half a sentence: the pointer now sits in the agent instructions. The other half would be a PR check that fails when the six files disagree.
@heinrichneb "The hook worked. The only pointer to it was a comment in the script's header, which you read once you've already found the script."
That is the whole problem in one sentence, and it is the same shape as mine.
I keep people's exact words on one page. Eighteen lines. Each line goes back to the person who said it, and it gets printed only after they say yes to the words and to the place they will sit. The check works. The pointer to it does not. Nobody learns the rule until a sentence has already gone up wrong, which is where two of mine came from: the text changed between my draft and the live post, and with no saved copy there was nothing to compare it with.
Your six files give your check a second copy. When they disagree, something fails with no person in the loop. A spoken line has one copy, my memory of it. Before anyone reads it back, there is no second text to diff, so the only state that proves the check ran is the speaker repeating the exact words and saying yes to that string. The part I cannot settle, and the reason I am asking you: do you see any check that works where there is no second copy? Or is a person's read-back the floor, and the work is only to make sure they meet it before the words go up?
The form I use, if it helps to see it: pub-a941bfd863a24f91a60e6c4979c18a...