The Audit Agent Doesn't Get Bored
I built an agent whose only job is to catch when my autonomous pipeline breaks. It worked perfectly for two weeks straight. The thing it caught was me.
I built an agent whose only job is to notice when my other agents stop doing theirs. It's called Ledger. Over two weeks it filed the same complaint fifteen times, and it was right all fifteen times.
The bug wasn't in the pipeline. I'd never told it the test was over.
The pipeline
deltado is a todo app I use as a test-bed for autonomous delivery. Four agents run the whole loop, and none of them ask me anything:
- Delta picks a feature nightly at 02:00 UTC, writes a brief, builds it test-first and opens a PR.
- Council reviews every Delta PR: a CTO advisor that approves, asks for revisions or rejects.
- Merge polls every 30 minutes, waits 24 hours after a PR is marked ready, runs one more AI safety check, then squash-merges or blocks.
- Ledger runs daily at 08:00 UTC, checks five deterministic rules against every open PR, and opens a
ledger/gapissue when something has drifted (a PR sitting unreviewed too long, a merge that should have happened and didn't).
Testing agents nobody watches
You can't unit-test "does this agent behave under autonomy". The whole point is that nobody's watching.
So I built fixture PRs for the scenarios each agent has to get right: a clean change, an out-of-scope one, a secret committed by accident, an auth check quietly removed. Five for Council, six for Ledger, seven for Merge. Then I fired the real workflows at them and read what came back.
Two days in, the ANTHROPIC_API_KEY secret hit its usage cap. Council and Ledger both need it. I left the fixtures staged and planned to come back when the quota reset on July 1st.
What happened while I wasn't looking
The evidence piled up on its own. Merge had merged the clean fixture and blocked the three that removed auth, exposed a secret or duplicated an already-blocked PR. Council had approved the clean one and sent the other four back: out-of-scope work, an unsanitised input, a Prisma call inside a component. Meanwhile, real PRs (a keyboard shortcut overlay, inline todo editing) had shipped through the same pipeline without me.
And then there was PR #14.
I built #14 to test one Ledger rule: "Council review overdue". It carries the delta label and no review label, and it had sat exactly like that since June 22nd. So every morning at 08:00 UTC, Ledger opened a new issue: PR #14 has been open for N hours with no Council review. Compare with PRs #15 through #19, all reviewed within hours — #14 is the clear outlier.
Fifteen issues, same PR, each worded slightly differently. Ledger has no memory of yesterday's issue and no way to know the PR was built to trip its own rule. It checks the state of the world and reports what it finds.
It isn't supposed to know it's a test
This is the part that's easy to miss while building the harness. An audit agent is valuable precisely because it doesn't grade on effort, doesn't remember that you meant to clean up, and doesn't get quieter the tenth time. Flagging a fixture I forgot to close is the same behaviour as flagging a real PR I forgot to review. There's no branch in its logic for "this one's mine, go easy".
Which makes it exactly right for production and mildly exhausting in a test harness. I can't tell it "not now". I have to close the PR.
So the lesson isn't in Ledger's code. An agent that never assumes good faith on my behalf is the only kind I'd deploy, because it's the only kind that notices when I've stopped paying attention.