BlogUse case

A verdict on every change your coding agents ship

Agents now write changes faster than anyone can review them, and review cannot see what a change does when a server dies halfway through. Afterfault runs each change in a copy of your real system under failures, before the pull request, and returns a verdict with the run behind it.

Writing code got cheap this year. A team with coding agents opens more pull requests in a week than it used to open in a month, and the agents are good: in our own test this week, Codex fixed a real crash-safety bug in a hundred-thousand-line Go codebase from a two-line ticket, in 13 minutes (the write-up).

Checking did not get cheaper. Every change still waits for a person to read it and for CI to run it. And the failures that cause real outages are the ones neither of them is built to see.

What review and tests cannot see

Tests run each step in order, on a healthy machine. Reviewers read the code as written. Production does neither. Processes are killed during deploys, networks drop for a second, a partner's API returns 503 at the worst moment. The bug lives in the gap between two lines that each look correct.

Here is one we built into a task this week, a small change that a reviewer would approve. A worker charges orders through a payment partner. On each retry it sends a fresh idempotency key, which reads like a reasonable choice in a diff.

Worker Partner charge order 3, key A accepted: the card is charged killed before it records order 3 as done restarts, finds order 3 still pending charge order 3, key B a new key looks like a new order: the card is charged again The customer is charged twice. Every step returned success.
A change that passes review and every test. The duplicate charge only appears when the worker dies in the gap between the partner accepting and the worker recording it.

Nothing in that sequence fails. Every call returns success, every log line is green. The only way to see it is to kill the worker at that moment and count what the partner received.

Check it before the pull request

Afterfault gives the agent, or the engineer, a way to do exactly that before anyone else spends time on the change.

01 The agent writes a change In the editor or in a background task, as it does today. 02 It calls Afterfault Over MCP or the command line, before it opens a pull request. 03 A copy of the real system Built from the compose files, manifests or start scripts the repository already has. 04 Runs under failure Crashes, pauses, cut connections and power loss, many runs, each in a different order. 05 A verdict, with the run behind it Holds: the pull request opens with its runs attached. Breaks: the exact sequence goes back to the agent. breaks: fix it and run again
The loop runs before the pull request. A change that reaches review has already been through the failures that matter for that system.
  • A copy of the system you actually run. It is built from the files you already have: compose files, Kubernetes manifests, start scripts. Your real services, your real database, your real queue. No code changes, no mocks of your own code.
  • Failures on purpose, in many orders. Crashes, pauses, network partitions and power loss, hundreds of times, each run in a different order, because the order is where the bug is.
  • A verdict from outside the change. The check looks at what happened: what the partner received, what the database holds. It never asks the code whether it worked, and the agent that wrote the change does not get to mark its own work.
  • The run behind every red. A failure comes back as the exact sequence of events that caused it, cut down to the few faults it needs, and the agent can replay it until the fix holds.

For an agent, it is one more tool:

bash
claude mcp add afterfault -- afterfault mcp
afterfault env infer      # build the environment from the repository's own files
afterfault explore        # run the change through failures, many orders
afterfault replay         # rerun a kept run exactly

Found on real software

We gave an agent one question about listmonk, an open-source newsletter server: if it restarts while it is sending a campaign, does every subscriber still get the email? It had only listmonk's source and our public documentation.

7 min

from an unfamiliar codebase to a first meaningful run

170

runs, each with a different schedule of faults

24 of 40

subscribers never got the email in the run that was kept, while listmonk said finished

The full write-up has the run step by step. The status said finished. The mail server said otherwise, and the check believed the mail server.

A status field reports what the sender believes. A verdict counts what arrived.

Every red becomes a test

A run that broke something is kept. It replays against every later change to the same system, so the next agent that touches the worker gets checked against the crash that caught the last one. Over time the kept runs become a record of every way your system has been shown to fail, run on every change, without anyone writing them by hand.

That is the part that changes how a team works with agents. Review stops being the only gate. A person reads a change that has already survived the failures that matter for that system, with the runs attached, and spends their attention on what the change is for.

Bring one service

If your coding agents open pull requests against services with queues, databases or background workers, bring one service and we will run its next change.

Keep reading

Bring a system you need to trust.

Tell us what it runs on and which failure worries you most.

Request early access