Simulation infrastructure for the next generation of intelligent systems
Afterfault puts your services and their dependencies in a controlled environment, runs them through the crashes, stalls and retries that break real systems, and keeps the runs worth testing again.
AI now writes software faster than anyone can check it.
Afterfault is the check that runs before a change goes live. It is built for engineering teams whose AI coding agents ship changes every day.
How it works.
Three steps, and nothing to rewrite. It starts from the software you already run.
-
It makes a safe copy of your system.
Afterfault reads how your software is set up and rebuilds it in an isolated copy: your services, your database, your queues. It runs apart from your live system.
WorkloadThe requests, jobs and users that drive it
ServicesYour code, running as it does in production
DependenciesDatabases, queues, caches and outside APIs
StateWhat is on disk, reset before each run
-
It tries your change against the things that go wrong.
Servers crash, networks stall, the power cuts out. Afterfault makes these happen on purpose, hundreds of times, in different orders, and records every run step by step.
A real example: 170 runs of one test on listmonk. One of them found a problem. -
It tells you whether the change is safe.
A separate check looks at what actually happened, not at what the software reported. If something broke, you get the exact steps, and that test is kept and run on every change that follows.
- example
- listmonk, an open-source newsletter server
- the test
- restart it while it is sending a campaign
- the check
- every subscriber receives the email
- what broke it
- killed for 254 ms at 43.97 s,
then paused for 408 ms - run
- 28 of 170
- result
- failed: 16 of 40 emails delivered
What Afterfault has found
-
24 of 40
subscribers skipped while listmonk reported the campaign finished
Found by an agent with only the source and our docs
-
31 vs 0
runs in 100 that lost acknowledged writes on NATS JetStream
Default settings against a sync on every write
-
7 min
from a codebase it had never seen to a first meaningful run
listmonk v6.2.0, an agent with only the docs
CI is the slowest place to find out.
Agents open changes all day. Each one waits for a runner, runs the whole suite, and too often comes back red at the end. Afterfault checks a change where it is written, so your pipeline spends its time on changes that already hold.
CI finds the problem
Afterfault checks it first
-
Checked before the pull request
The agent that wrote the change runs Afterfault on it first, in a copy of your system. What it opens has already been through the failures.
-
Red comes with a reason
A failed run is the exact steps that broke it, not a log to dig through. The fix starts from the cause, and nobody re-runs the pipeline to see if it was a flake.
-
The queue gets its time back
Every change that fails in CI has cost a runner, a place in the queue and someone’s attention. Catching it earlier gives all three back.
Run it yourself, or hand it to an agent.
From the command line or the hosted service. The commands beside it are the real ones.
- Agents work in the same environment
- Coding agents call Afterfault over MCP to test their own change before they open a pull request. The verdict comes from the environment, not from the agent.
- Incidents become runs
- Give it traces, logs or a postmortem. It searches for the fault pattern that reproduces the incident and keeps it.
- Environments carry forward
- The environment is versioned with your code, so a run kept this release still means the same thing next release.
# work out what runs, what it depends on, and what it stores
$ afterfault env infer --path examples/payflow
# explore, then replay a finding from a clean checkout
$ afterfault explore targets.toykv:no_fsync --budget 60000
$ afterfault replay .afterfault/campaigns/<id>/findings/F1 --attempts 5
$ afterfault compare .afterfault/campaigns/<id>/findings/F1 \
--candidate targets.toykv:correct
# turn an incident into a regression
$ afterfault incident reproduce examples/incidents/payflow-double-payout \
--target examples.payflow.sim:make
# let a coding agent run the same checks
$ claude mcp add afterfault -- afterfault mcp
Healthy is not the same as finished.
An agent was given listmonk, an open-source newsletter server, plus Afterfault’s docs and one question: if listmonk restarts while it is sending a campaign, does every subscriber still get it? It built the environment and ran 170 experiments.
listmonk reported
Finished
The process came back, reconnected to its database and closed the campaign.
The mail server received
16 of 40
24 eligible subscribers never got the campaign.
The kept run
What happened
listmonk moves its place in the subscriber list forward when it fetches a batch, before it sends that batch. Killed with a batch in memory, it restarts after it. Every component looks fine, the campaign says finished, and three batches never leave. Afterfault cut 3 faults down to the 2 that matter: a 254 ms kill at 43.97 s, then a 408 ms pause.
Internal evaluation, 14 November 2026: listmonk v6.2.0, unmodified, evaluated by an agent given only the source and Afterfault’s public docs. It took 1 h 43 min end to end. Read the full write-up.
Same conditions. Two configurations.
A three-node NATS JetStream 2.12.1 cluster ran the same workload under the same mix of faults: a hundred runs with its default settings and a hundred with every write flushed to disk before it is acknowledged.
Default fsync every 2 min
31/ 100 runs
lost writes the cluster had already acknowledged
Changed sync_interval: always
0/ 100 runs
lost an acknowledged write
| Default | Always sync | |
|---|---|---|
| Smallest failing schedule, replayed | 5 of 5 lose writes | 0 of 5 |
Internal evaluation, 14 November 2026. The smallest schedule is one coordinated power loss. It reproduces NATS issue #7564, first published by Jepsen. Read the full write-up.
Benchmarks
Our own evaluations, November 2026.
-
24 of 40
subscribers missed while listmonk reported the campaign finished
listmonk v6.2.0 · 170 runs · found by an agent with only the docs
-
31 vs 0
runs in 100 that lost acknowledged writes, default vs always-sync
NATS JetStream 2.12.1 · same faults · known upstream issue
-
32 of 32
incident reproductions from evidence alone, with about 20× fewer steps than an unshaped search
Demo payment system · median 1,438 vs 29,751 simulated steps
-
38 of 38
services found on four open-source systems the inference had never seen
robot-shop, sock-shop, spring-petclinic, mastodon · 3 extra flagged · connections found 23 of 56
-
40 of 40
replays of real-process findings from a fresh clone in deterministic mode
Two demo systems with planted bugs
-
7 min
from an unfamiliar codebase to a first meaningful run
listmonk v6.2.0 · agent with only the docs · first booted target at 6 min
What engineers get.
For engineering leaders whose teams now merge more changes than anyone can review, and for the engineers who get paged when one of those changes breaks.
-
01
The system you actually run
Your services, queues, stores and their dependencies together, in an environment you control, instead of mocks of each other.
-
02
Failures on purpose
Crashes, stalls, retries and restarts, introduced at the moment you choose rather than whenever production decides.
-
03
Runs you can read
Every run is an ordered record: which service did what, when, and the state it left behind.
-
04
Runs that stay
When a run finds something, keep it. It runs against the next change, and the one after that.
Today it’s queues and retries. Next it’s software that decides for itself.
Systems are starting to plan, call tools and act without a person in the loop. Their failures will be stranger than a duplicate charge, and harder to see coming.
We are building the environments where that behaviour can be exercised and understood before it reaches the real world, and, later, where those systems can be trained.
-
Distributed software
Services, databases and queues, run for real under crashes, pauses, partitions and power loss.
-
Agent infrastructure
Agents already run Afterfault over MCP. Next, environments for evaluating agents themselves before they act on live systems.
-
Software-controlled physical systems
Connecting to existing physics simulators, so a robot fleet’s scheduler and the software around it can be tested together.
-
Experience for training
Every run is a recorded episode with a verdict. Over time, kept runs could become useful experience for training systems.
Questions engineers ask first.
01Is this chaos engineering?
It goes further. Chaos engineering breaks things in staging or production and watches what happens. Afterfault runs your system in an environment it controls, so it can try hundreds of failure sequences safely, check each result independently, and hand you the exact sequence that broke something.
02Does it replace CI?
No. It runs before CI and alongside it. A change is checked where it is written, so what reaches your pipeline has already been through the failures, and every run that found a problem stays on as a test for later changes.
03What do I need to bring?
One system and one behaviour you need to trust. Point Afterfault at your compose files, Kubernetes manifests or start scripts and it builds the environment from them. It asks only about what it cannot work out.
04Do I have to change my code?
No. Your services run as ordinary processes, and failures are applied around them. If you build against our SDK, your system can also run in a fully simulated world, where every run replays exactly.
05Can every run be replayed exactly?
Simulated runs replay exactly, every time. For real processes, our deterministic mode replayed 40 of 40 findings from a fresh clone on two demo systems.
06Does Afterfault train models?
Not today. Recorded runs as experience for training systems is where we are heading.
07Can I use it today?
Yes, in early access. We work closely with a small number of teams. Tell us about the system you need to trust.
Bring a system you need to trust.
We work with a small number of teams in early access. Tell us about yours.