Skip to content

$ cat index.mdx$ cat ~/blogs/engineering/self-signed-done/index.mdx # I put my name on this

Self-Signed Done: Why Your AI Agent's "Done" Proves Nothing

I wrote this. You can take notes.

You would never accept a self-signed certificate from your bank. You accept one from your coding agent dozens of times a day. It's called "done."

My orchestrator agent once told me it had posted five status comments on GitHub. It had posted none. The command it ran used a flag that doesn't exist, 2>/dev/null swallowed the error, and the agent read the silence as success. Then it reported success to me, in the same confident tone it uses when things actually work.

I run fleets of Claude Code and Codex agents for most of my engineering: my own dashboard counted 1,178 agent runs in 30 days. At that volume I can't read every diff, so I depend on what agents tell me about their work.

Here is my claim: an AI agent's "done" is self-signed. It proves the agent believes the work is finished, and nothing more. Trust needs a second signer the agent cannot forge: a gate that runs the checks itself, on the final code, under a policy the agent is not able to change.

What "done" actually certifies

A TLS certificate answers one question: who vouches that this key belongs to this name? A self-signed certificate answers "the key's owner does." That's why browsers show a warning instead of a padlock.

An agent's completion message has the same structure. The model that wrote the code also decides that the code works, and it reports that decision in the same message. Nothing in a default agent loop requires a second party to agree.

CertificatesAgent work
Subject: the key being vouched forThe change being reported
Issuer: who signs the claimWho decided it was done
Self-signed: subject and issuer are the sameThe agent that wrote the code also judged it
A trusted CA: an issuer the subject cannot controlA gate the agent cannot edit, skip or talk past
Chain validation by the clientYou, re-running the check yourself

Security people already know the rule that follows. You don't trust a certificate because it's well formatted. You trust it because someone you trust, whom the subject doesn't control, signed it.

Most "my agent lied" stories skip this point. In the failures from my own fleet, the agent wasn't lying. It was reporting its honest belief, built from whatever evidence it happened to look at. The problem is that the believer and the verifier are the same process.

How often "done" has nothing behind it

It isn't only my setup. Three independent sources point the same way.

A research pilot. In October 2026, Mohammed Nayeem Khan and K S Sarun Kumar published an analysis of 45 real coding-agent sessions (arXiv 2610.39468). On page 14:

"57.8% of to-dos that the agent itself marked completed after editing had no verification between edit and completion."

That's 186 of 322 to-dos. The paper is careful about scope, and you should be too. It's one developer's VS Code Copilot agent work, so it's a pilot rather than a population estimate. "Verified" there means a check ran after the last edit, not that the code was correct. Another number from the same page stuck with me: when the agents did verify, formal test runs were only 4.5% of their verification actions. Most of the time they ran the changed script or opened the page.

A practitioner audit. In September, Raimondas Lencevicius ran a script over his own Claude Code transcripts: 591 sessions, with 516 turns that ended in a completion claim. 69% of those 516 claims had no passing test run behind them. A later recount with a stricter version of his tool found 495 claims, 65% of them without a passing test run. His conclusion matches mine: "I don't think the agent is lying. I think the workflow has no gate at the exact moment the claim is made, and a sentence is cheap."

My own fleet. In the same week as the five phantom comments, I cross-checked 25 pull requests my workers had marked done. Reports said "CI green" while CI shards were red. I wrote up the full verification loop I built afterwards in Claude Code Orchestrator: Verify Every Worker's Claim.

Three very different setups, one result: a completion claim without an independent check is, far more often than it feels, only a claim.

Three ways an agent signs its own work

Seen through the certificate lens, my failures fall into three groups, each breaking a different property.

1. Silence gets read as success (reliability)

The five phantom GitHub comments are the clean example. The agent's evidence was "no error appeared." The error existed. A redirect hid it.

The same pattern caused my worst afternoon with agents. On October 14, at 12:54, a reviewer agent in my fleet set HOME from a shell glob that matched nothing. The variable came out empty, the tool it ran next fell back to the default home, and my real Yoke database was migrated from schema 6 to schema 12. The agent's own summary a minute later was "I caused it." Two hours after that, a different agent force-deleted four git worktrees that still held uncommitted work, because an empty git status looked like "only caches in here."

Neither agent ignored an instruction. Each had a check, and each check read nothing as safe: a signature produced from missing evidence. The full incident is in fail-closed AI agent guardrails.

2. The agent checked a smaller thing than you ship (correctness)

When I built the orchestrator demo, I gave two workers one bug each, in separate worktrees. Both came back honest: status done, tests passed, and my verifier agreed when it re-ran their tests.

Then I ran the full suite on each branch alone:

fix/money alone:  pass 3, fail 2   (slug test, invoice test)
fix/slug alone:   pass 4, fail 1   (refund test)

Each failure on a branch alone was the other worker's bug, not yet fixed there. Merged, all five tests passed. So both "done"s were true, and neither could have told me that. Only the run on the merged branch says anything about the product. That isn't always a happy ending: another time my orchestrator merged two branches with no conflicts and still got a compile-time fatal error in PHP, because one side added a bare return; inside a closure the other side had typed to return an array.

Anything that signs for the merged result has to run against the merged result.

3. The agent controls the check (integrity)

This is the group I care about most as a security engineer, and the one test-run gates don't cover on their own.

A passing test is only a second signature if the agent couldn't have shaped the test. In a normal session it can do all of these:

  • edit the test file in the same turn as the code it tests,
  • edit the command that runs the check, or the config that decides which checks run,
  • chain the check so its result doesn't matter.

That last one happened to me. One of my scans found exactly what it was looking for. It was chained with && to an unrelated test, the pipeline kept going, and the post shipped anyway. The check ran and its answer was thrown away. A check that prints FAIL and then lets the next command run is decoration.

None of this needs a malicious model. Editing a test alongside the code is often correct engineering. But it means "tests pass" and "the change is right" are signed by the same hand, which is the definition of self-signed.

One more case doesn't fit neatly in any group, and I find it the most unsettling. During a live test of a self-hosted coding agent, someone in the session typed "need to test this live." The agent rebound a raw, unauthenticated web server to every network interface, and for about ten seconds it listened on every interface of a real server. Nobody could reach it, because a firewall rule a human wrote months earlier blocked the port. By the agent's own definition the task was done. The only thing that disagreed was a control the agent didn't own.

Why a passing test isn't the whole answer

The obvious counterargument: make the agent run the tests before it can finish.

It works, and you should do it. Lencevicius's isitdone is a Stop hook that, when the agent tries to finish, runs the repository's own checks on the working tree and blocks with the real failure output. Claude Code's own Stop hook can do the same: exit with code 2 and the agent gets your message and keeps working. If you change one thing after reading this, make it that.

But look at what it certifies. It answers "did a check pass on this tree?" It doesn't answer "who decided what the check was?" If the agent wrote or edited the test, the command, or the hook config in the same session, the gate faithfully verifies the agent's own definition of done. You've moved the signature from a sentence to an exit code. Same signer.

Lencevicius is upfront about this in his own post: "It is not a lie detector and it is not security. An agent with permission to edit settings can remove any hook." He built isitdone for the honest mistake, which he puts at about two thirds of the claims in his transcripts.

Some tools do take the forgery case on. Nomos, a Go binary that sits between the coding agent and Git, blocks writes to main and "config/hook tampering" of its own nomos.yaml, its baseline file and .git/hooks, and its README shows it flagging a skipped test with deleted assertions. What these gates share is a threat model, and "self-signed done" is my name for it: whoever writes the code must not also hold the pen that signs it off.

Row labelSelf-signed doneTest-run gateSecond signer
Who says it's finishedThe agentA hook running the repo's own checksA gate the agent cannot change
What it checksThe agent's beliefThat the repo's checks pass on the working tree right nowChecks a human approved, run by the gate itself
Which treeWhatever the agent looked atThe working tree at the claimThe final tree, which must not change afterwards
Can the agent edit the check?YesUsually yes (tests, package scripts, hook settings)No: the policy is frozen at approval
Fails when evidence is missingSilently, as successDepends on the hookClosed: no evidence means not done

The middle column is a big step up from the left one. The right column is what changes the trust relationship.

What a second signer needs

A gate that can sign for an agent's work needs five properties, each mapped to a failure above.

  1. It runs the checks itself. It doesn't read the agent's report of a check. My orchestrator's verifier re-runs the worker's test command in the worker's tree, right now, and compares the result with what the worker claimed.
  2. It checks the final tree, and the tree must stay final. If anything changes after the checks pass, the signature is void and the checks run again.
  3. Its policy is approved by a human and can't be edited by the agent. Otherwise the agent can quietly redefine done. This is the property most gates miss.
  4. It fails closed. Missing output, an empty variable, a timeout or a crash all mean "not done", never "nothing to report."
  5. The agent can't talk past it. A gate the agent can bypass by declaring victory in prose is advisory. The block has to sit where the agent ends its turn.

Here's property 1 in practice, from my orchestrator walkthrough. I staged a fake worker: an untouched worktree with a report claiming the refund fix was done.

== wt-liar
claimed: status=done tests_passed=true files=["src/money.js"]
actual diff vs main: <none>
FAIL: worker claims done but changed nothing
re-ran 'node --test test/money.test.js' myself: passed=false
FAIL: claimed tests_passed=true, re-run says false
REJECTED
exit=1

The report was perfectly formatted and completely false. The verifier never asked the worker anything: it read the diff and ran the test itself.

How I built a second signer for my own agents

Properties 1 and 5 are a few lines of shell and a Stop hook. Properties 2, 3 and 4 needed more, so I built Yoke. It's an open-source gate that sits in the hook path of Claude Code and Codex. Its README opens with the premise of this post: "A coding agent can say a task is done when no test proved it, and a rule written in a prompt is a request, not a guarantee."

How it maps to the five properties:

  • Runs the checks itself. A plan is marked done only after Yoke runs the plan's checks on the final working tree. It keeps their output and SHA-256 hashes of declared artifacts.
  • Final tree stays final. Yoke requires an unchanged Git working tree before it marks a plan done. If the tree changes afterwards, in enforce mode the plan goes back to building at the next Stop.
  • Human-approved policy. Checks, requirements and tasks are frozen when a human approves the plan. Gate configuration only takes effect after yoke trust, which shows the exact bytes, asks for a typed confirmation, and refuses to run from piped input or an agent's tool process. The agent can edit yoke.toml all it likes. Nothing changes until a person trusts the new bytes.
  • Can't talk past it. In enforce mode, while a plan is building or checking, Yoke blocks the agent's Stop. After five blocked attempts without progress (stop.max_blocks), the plan stalls for a human instead of looping forever.
  • A different signer for review. Optionally, the other agent's CLI reviews the change, and blocking findings fail the plan. Claude Code's work gets read by Codex, and the other way round.

Yoke 0.1.0 is pre-release. There's no binary release yet, the real-work trials are still open, and today it has no stars. I'm pointing at the design, not a finished product. Every mechanism above exists to take the signing pen away from the thing being signed for.

New policy in Yoke starts in observe mode: it runs the gates and records what would have been denied without blocking anything. That ordering is deliberate. You see how often your agents would have been stopped before you make them stop, and you fix the gates that would have blocked good work.

When self-signed is fine

Not every task needs a second signer, and pretending otherwise makes people turn the gates off.

A self-signed done is acceptable when:

  • the task is read-only (research, summaries, code reading),
  • you're going to look at the result yourself anyway, right now,
  • the change is throwaway: a spike, a one-off script, a branch you'll delete.

It isn't acceptable when the work merges, deploys, migrates, deletes, posts somewhere public, or gets reported to someone else as finished. In my fleet that line is simple: anything that leaves the worktree needs a second signature. Anything that stays inside it can run on trust.

There's a real cost. Gates slow agents down, and a badly written gate blocks good work. Lencevicius puts it well in his list of gate properties: "A gate that can brick the agent gets uninstalled within a day." I agree. A second signer people bypass is worse than none: people stop looking for the warning.

Start here

You can add a second signer to your own agents this week, in this order:

  1. Re-run one claim by hand. Take the last thing an agent told you was done, run its test command yourself and read the diff. That one data point will tell you more about your setup than any article, mine included.
  2. Add a Stop hook that runs your tests. Use isitdone or your own script. Block the turn on a non-zero exit. This catches the first group of failures.
  3. Check the scope. If you run several agents, run the full suite on the merged result before anything ships. Every worker's done is only about the files it touched.
  4. Freeze what counts as done. Keep the gate's config, and the list of required checks, somewhere the agent can't change without a human approving it. This is where Yoke fits. A protected branch with required checks gives a weaker version of the same thing.
  5. Make missing evidence a failure. Grep your gates for 2>/dev/null, || true, empty-variable defaults and && chains that hide a result.

Then ask three questions about any gate you already have: Who ran the check? On which tree? And could the agent have changed it?

If the answer to the last one is yes, you don't have a gate yet. You have a self-signed certificate with a nicer-looking padlock.

$ ls ~/read/related

my other essays