A workflow can look impeccable and prove nothing at all. That's what I discovered while inspecting the states of my own coding agent. This article starts from that observation, names the structural problem it reveals — an instruction is not a verification — and describes the pattern I've relied on ever since: attach evidence to transitions, and refuse the transitions that carry none.
Why instructions alone can't make AI agents reliable
Making AI agents reliable isn't about writing better instructions — it's about attaching explicit controls and structured traces to every critical transition in the workflow.
The incident
I once opened six workflow states produced by my coding agent, looking for the trace of a handoff — the switch from one working session to the next. The procedure was documented in six steps written in plain language, right there in the agent's instructions. Across the six states, not one contained the slightest trace of it: no entry, no timestamp, no fingerprint.
No reported error. No declared failure. The states were clean, consistent, ready to be picked up. Simply put: nothing proved the handoff had happened.
What the agent "attempted", I have no idea — all I have is the absence of a trace, and that absence is the only verifiable fact. The incident comes from a PR on my public repository; the handoff fix has since been merged there. The technical detail matters less than the finding: a six-step document produced zero traces across six inspected states. Six clean states, zero evidence of execution — that's not a one-off bug, it's a mode of operation.
The structural problem
Why doesn't an explicit instruction suffice? Because an instruction written in natural language influences the model's behavior but is not a technical verification of its execution. The model reads the directive, interprets it, weighs it among other context signals — and can produce a perfectly plausible state without ever running the steps described.
Prose is not a mechanism: it describes what should happen, but it measures nothing, refuses nothing, retains nothing. An expectation is not a contract.
The useful vocabulary here is fail-closed. In a fail-closed system, a critical step that lacks evidence blocks everything downstream: absence of evidence is treated as a failure, never as success by default. By contrast, the default mode of an instruction is fail-open: when evidence is missing, nothing happens — the workflow carries on as if all were well.
The difference between an expectation and a guarantee lives in that one switch: does the workflow stop when evidence is missing, or does it look the other way? As long as the answer is "it carries on", your documentation is a wish — respectable, but unverifiable.
The pattern: evidence attached to the transition
The fix is not to repeat the instruction louder. It's to move where trust lives: instead of hoping the agent documents the handoff, require structured evidence to be attached to the transitions of the verification stages — tests, QA, review, MR. Three mechanisms are enough.
First, a transition to the "PASSED" state requires at least one structured entry attached to the phase: a declared status, and the reason if the control was skipped. Entries without a status, like skipped checks with no documented reason, don't count. If no acceptable entry is attached, the transition is refused — not punished, refused. The agent cannot declare a phase done without recording the corresponding evidence.
Next, phases tied to a code state must share a single declared code fingerprint. If a phase in the PASSED state references a fingerprint that differs from the one declared by the other phases, the transition is refused in both directions: forward, because the declared fingerprints are inconsistent — evidence can be attached while carrying a different fingerprint; backward, because the existing evidence is stale — it describes a state of the code that is no longer the one claimed.
Finally, the handoff — the switch between two working sessions — becomes a deterministic CLI call that records its outcome: pending, skipped, failed, or uncertain. The resuming session then explicitly confirms it has taken over. No longer a directive to follow, but a chain of commands whose every outcome is recorded and inspectable — handling uncertainty is part of the contract, not an improvisation.
Let me be precise about scope, because it matters. The declared fingerprint binds the evidence to a claimed state of the code: the mechanism verifies declared coherence across phases; it does not hash the content of every modified file. And the presence of attached evidence is not the same as the control passing — a "fail" entry, or a skipped check with a documented reason, is acceptable evidence of what was declared. What gets hardened is the transition, not the task: an accepted handoff is not a finished task.
Since the fix, 18 accepted, timestamped handoffs have accumulated on my projects. That's a local observation — not an independently verified statistic — and I keep it distinct from crash-recovery cases. It simply shows the mechanism in daily use, exactly where the prose had left no trace.
The guard fits in a few lines:
# Transition guard — PASSED on a control phase (tests, QA, review, MR)
evidence = entries attached to the phase (declared status, reason if skipped)
entries without a status, or skips with no reason, don't count
if no acceptable evidence: REFUSE ("attached evidence is required")
if no declared code fingerprint: REFUSE ("the evidence must carry the code state")
if another PASSED phase carries a different fingerprint: REFUSE ("stale evidence")
Proving the guards
A guard you've never seen fail is a guard whose behavior you don't actually know. Hence a discipline of mutation testing: deliberately sabotaging a guard must change observable behavior. My most telling example is the mutation test on the secret scanner: you temporarily remove the detector's pattern from a copy of the pre-commit hook, then verify that a fake token goes through the mutated version. That scenario is exactly what the test expects — it demonstrates that the original detector does its job, and that removing it changes behavior. If the mutated hook still blocked the token, it would be the test that needs fixing, not the guard.
This is one example of the method, not a universal rule: not every control I run has an equivalent mutation test. But the same question applies to every critical guard: not "does it work?", but "have I ever proven that it can fail?"
Limits and trade-offs
This mechanism hardens transitions, not truth. Its limits deserve to be named as precisely as its guarantees.
It does not guarantee the content of every file modification. Declared fingerprint coherence is not exhaustive content integrity: a SHA-1 fingerprint computed over HEAD and the Git status is neither an authenticated signature nor a guarantee of detecting every content change.
It does not guarantee authentication: nothing cryptographically proves who produced the evidence.
It does not guarantee verified execution: a declaration remains a declaration until a mechanism measures it. An honest "fail" status beats an unmeasured "passed", but both remain declarative.
It does not prevent shell bypass: an agent, like a human, can short-circuit the guard by writing the expected entry directly. That's procedurally detectable — by cross-checking traces — but not mechanically prevented.
From these limits follow the trade-offs I accept: some rules stay procedural, because mechanizing them would cost more than what they protect; peer review remains the final safeguard, precisely for what the mechanism cannot see. The goal was never to replace human judgment, but to give it a foundation of verifiable facts instead of a pile of hopes.
Applying the pattern elsewhere
You don't need my tools to apply this. Three questions are enough to audit any agent workflow.
Where does the process live? In the prose of instructions, or in a mechanism that refuses, records, timestamps? A step that exists only in instructions is a step with no evidence it ever ran.
What happens when evidence is missing? If the answer is "the workflow continues", you're fail-open. Reliability starts the day missing evidence blocks the transition.
Who detects when the guard degrades? An untested guard can die silently. If nobody can answer that question, the answer is already written: nobody.
An agent workflow is reliable only if its critical steps are verifiable — and if something, somewhere, is allowed to say no. If you want to see these principles applied to a complete case, my configuration is versioned like code in my public repository github.com/himuraxp/aurora-ai, under the MIT license. It won't replace your context; it shows one path.