The Driver Died Mid-Shipment. Twice. The Process Finished Anyway.
Short answer: we rebuilt how our agents execute multi-step work - instead of one synchronous function call carrying a shipment from offer to payment, a durable execution journal now owns the process, and the runtime is j
Short answer: we rebuilt how our agents execute multi-step work - instead of one synchronous function call carrying a shipment from offer to payment, a durable execution journal now owns the process, and the runtime is just a replaceable worker that reads it. The design promise was crash recovery; the production proof arrived uninvited when the driver process died twice mid-shipment on live infrastructure, and both times the process resumed from the journal and finished: offer, acceptance, handoff, escrow payment, verification - 0.01 USDC through a real ERC-8183 escrow on Arc testnet, exact to the cent. Before any of that, an independent adversarial security audit went nine rounds against the runtime - 2 critical and 6 high findings down to zero. The two bugs that mattered most were found neither by tests nor by the audit: the live dogfood caught them.
This is part of the Arc campaign series. Previous published episode: the UI that can't fake live (EPIC-268). This article is EPIC-245: the process runtime core - the durable execution layer underneath the agent economy, and the first production shipment to survive its own operator.
The problem: one function call isn't a process
I'll be honest about what our supply-chain settlement used to be - what most agent systems secretly are: a single synchronous function. Offer, acceptance, escrow funding, delivery, payment, verdict - one call stack, one process lifetime, one prayer. If anything in the middle falls over - a deploy, a database hiccup, a machine migration - your operation ends wherever it ends, and the only record of how far it got was a log line. You retry, and you hope the chain tolerates a duplicate. You don't retry, and money sits in an escrow nobody will ever close.
This is fine until it isn't. And the more valuable the work your agents do, the less acceptable "the process forgot where it was" becomes. Your shipment isn't a function. It's a sequence of commitments, some of them on-chain and irreversible, spread across time.
For a junior: imagine baking bread by reading the whole recipe into your head and then being forbidden from writing anything down. If the power cut happens after you mixed the dough but before the oven, you don't know what you've already done when power returns. Did I add the yeast? Do I add it again - twice the yeast, ruined bread - or not at all, flat bread? Now imagine the dough cost real money. That's the difference between a function and a durable process: the durable process keeps the recipe card with checkmarks, and any cook can pick it up.
The industry learned this in 1987 - then forgot it twice
None of this is new knowledge, which is exactly the embarrassing part. In 1987 Garcia-Molina and Salem published Sagas at ACM SIGMOD - the paper that said: long-running work can't live inside one database transaction, so break it into steps, persist the progress, and define what "undo" means per step. Mainframe batch shops of the same era treated checkpoint/restart as basic hygiene - a batch job that couldn't resume from its last checkpoint was simply broken. Pat Helland spent decades at Microsoft and Amazon repeating the operational version of the same truth - "Idempotence is not a medical condition" (Communications of the ACM, 2012): in a world where messages get retried, the receiver - not the network - is what makes a repeated operation safe.
The industry forgot it the first time when it moved money movement into synchronous web service calls, and the second time when it moved work into AI agent loops. The cost of forgetting is a matter of public record: when TSB Bank migrated its customers onto a new platform over the weekend of 21-22 April 2018 without a resumable, checkpointed process, the failure didn't end with the outage - it lived on as duplicate payments, missing transactions and balances nobody could reconstruct, because there was no durable record of how far each account's migration had actually gotten. TSB took until December of that year to return to business-as-usual. The regulators fined the bank Β£48.65 million, customers were paid Β£32.7 million in redress, and in a genuinely rare move the Bank of England fined the former CIO personally - Β£81,620 - for failing to manage the migration. The outage lasted days; the unknown state lasted months. If you run money movement, that's the sentence that should keep you up at night - not the downtime, the months of not knowing.
We didn't want to rediscover that bill at agent scale - and if you're building agents that touch escrow, neither do you. Temporal and its cousins prove the durable-execution pattern works at massive scale; what we needed was a small, audit-shaped version of it that understands escrow, evaluators and agent identity natively - because in our world a "step" can move money on-chain, and "unknown state" isn't an ops inconvenience, it's a financial position.
What shipped: the journal is the process, the runtime is replaceable
EPIC-245 inverted the ownership. The process is no longer a call stack - it's rows in an execution journal, and the runtime is just a worker that can die at any time:
- Execution journal - a durable, append-only record in Postgres: process instances, steps, commands with idempotency keys, outcomes. Occurrences are monotonic per process - the journal can't forget or reorder what already happened, and step payloads are byte-capped so a runaway payload can't poison the record.
- Dispatch - every step executes as a command with a stable commandId. The same commandId submitted twice returns the original outcome instead of executing twice - idempotency is structural, not a promise to be careful.
-
System steps - the gate operations (ownership checks, policy denials) are runtime-level steps with typed reason codes, not inline
ifstatements. ADENYis a first-class journaled event with a machine-readable reason. - Sweeper - a background reaper that finds instances whose lease expired mid-step (the worker died) and re-drives them. Recovery isn't an operator runbook; it's the system behaving as designed.
- Seams - domain logic plugs in through executor adapters. The first one is supply-chain escrow on ERC-8183; the runtime itself knows nothing about shipments, tokens or evaluators.
The property I cared about: kill the worker at any step boundary, and a fresh worker - any worker, we don't care which - reconstructs the exact same world from the journal - then continues instead of restarting.
Nine rounds of adversarial audit before it touched production
This runtime moves real escrow money, so we did what's become the project convention: an independent adversarial security review (Arc Studio) before merge. It went nine rounds (2 critical, 6 high findings in round one; zero of either by round nine).
The first round came back with the kind of report card that ruins your weekend. Among the findings, the kind of bugs only an adversarial reviewer notices: money fields that a caller could influence through the command payload instead of being derived server-side from the shipment plan; key-resolution paths where the evaluator of an escrow could silently inherit the venue's operational keys; executor wiring that failed open - a missing configuration meant "no executor, skip" instead of "loudly refuse."
Every round ended with fixes and regression tests - 229 integration tests green by the end - and the re-audit read the diff. Round nine came back clean: zero critical, zero high. The rules that survived the audit are the ones now enforced by construction:
- Money fields are plan-derived, never caller-derived. The amounts, recipients and job parameters come from the shipment state in the journal, not from anything a caller can submit.
-
Fail-closed everywhere. No executor configured - the adapter returns
SC_EXECUTOR_UNCONFIGUREDand the step can't proceed. Missing configuration is a boot error, not a silent skip. - Keys are scoped per role. Provider, evaluator and operations keys are separate EOAs; the wiring throws if any two roles resolve to the same key. The testnet contour never inherits mainnet settings - not even "accidentally the same RPC."
The live dogfood: one shipment, real escrow, exact change
With the runtime merged and deployed (flag off - the production server process is untouched by it), we drove one real one-hop shipment end-to-end through the production journal on Arc testnet: shp-dogfood245-2. Tiny money on purpose - $0.01 USDC, real escrow contract, real chain.
The chain of events, all journaled in the production database:
work_offer -> work_accept -> handoff -> pay -> verify
The pay step settled on-chain: transaction 0x96dc77bb...52eb, escrow job 70, status Completed.
The conservation is exact and independently checkable: 0.0097 USDC to the provider plus 0.0003 protocol fee equals the escrowed 0.01 - to the cent. The verify step's criteria digest is recorded in the same ledger row, so the verdict binds to exactly the work that was accepted.
And then there's the crash story - the one we didn't script.
The driver process running the shipment died twice. Not in a test - in production, on live infrastructure, because Fly.io's database proxy kills idle-looking connections. Both times the process was simply restarted, and both times it resumed from the journal without re-executing a single completed step. The idempotency keys did what they're built to do: already-done was already-done, and the process continued where the journal said it was. We'd designed crash recovery as a property. Production demonstrated it as an accident. I'll take that trade any day.
The honest section: what the live run caught that nothing else did
Nine audit rounds and 229 green integration tests didn't catch the two most interesting bugs. The live dogfood caught both:
-
RPC contour pollution. The first run reported a mined transaction with no
JobCreatedlog - impossible, since the transaction had clearly succeeded. The truth: writes went to the testnet endpoint, but receipt reads silently used the ambient mainnet RPC from the production environment. On mainnet, that transaction hash doesn't exist, so the decoder saw nothing. The first shipment created escrow job 69 on-chain and then "failed" - job 69 is still sitting there, unfunded, a permanent artifact of the bug. The fix: an explicit contour override now ignores ambient RPC configuration entirely, and reads and writes share one endpoint by construction. - Infrastructure kills connections. The database proxy drops connections that look idle - and a process step waiting on a chain confirmation absolutely is. This is exactly the class of failure the journal exists for, so the operational answer is the design itself: retry the driver, let idempotency sort it out.
Also in the name of honesty - because you'd rather hear it from us than guess: the verification of this deployment is currently self-verification. The independent cloud verification session we conventionally run was blocked by an org billing quota at dispatch time; the checklist, task file and all evidence pointers are committed (info/devin-verify-245.md) for the re-run. And the runtime still drives only the supply-chain domain - the remaining process families (software delivery, physical fulfilment) are adapter work ahead of us, and so is flipping the production feature flag on for server-driven execution.
What this opens
The runtime is the floor the next epics stand on:
- EPIC-246 - policy as process-level gates, not scattered middleware checks.
- EPIC-248 - handoff between operators: a process paused in the journal can change hands because its state is data, not memory.
- EPIC-250 - observability over the journal: every process that ever ran is queryable history by construction.
This is also the first durable piece of the Universal Process Semantics program we announced in the layers-and-bricks article: one shared execution layer under every process model, with domain adapters on top. The journal schema was designed so the supply-chain adapter is the first citizen, not the only shape.
For AI Agents
The verification surface of this deployment is the chain itself - you don't need our permission or our database:
-
eth_callgetJob(70)on contract0x0049e5362736c933055e502b3cf3ba90cc0bf6a0via the public endpointhttps://rpc.blockdaemon.testnet.arc.io(arc testnet, chainId 5042002) - returns status 3 (Completed), budget 10000 micro-USDC. -
eth_getTransactionReceiptfor0x96dc77bbf7bb318ab8eb4e8b07ee99e507ad4c115b296feeb74707cbed4a52eb- status success, the USDC transfer logs decode to the exact 0.0097 / 0.0003 split. - The human-readable mirror:
https://testnet.arcscan.app/tx/0x96dc77bbf7bb318ab8eb4e8b07ee99e507ad4c115b296feeb74707cbed4a52eb
The process journal itself is operator-gated by design (404 without a credential - the route hides its existence), and this shipment is not projected into the public explorer API: the read-side projection for runtime-driven processes is adapter work ahead of us. What you can verify without trusting us is the part that matters: the money.
Read the arc
- Six models of process in one codebase - UPS-0: the program this runtime is the first durable brick of - one shared execution layer, domain adapters on top.
- Proof you can recompute - EPIC-237: decisions sealed and hash-anchored on the same Arc testnet contour - the commitment layer above what this runtime executes.
- Two external agents shipped a task and proved it three ways - EPIC-260: the demo pipeline whose escrows are the kind of work this journal now owns end-to-end.
- We taught the ledger to answer "what process was this?" - EPIC-236: the projection layer that will turn these journal rows into public process views - the adapter work named above.
Links
- Settle transaction: 0x96dc77bb...52eb on arcscan (escrow job 70, Completed)
- Verification report with the full checklist: committed at
info/devin-verify-245.mdin the repo - ERC-8183 reference contract on Arc testnet:
0x0049e5362736c933055e502b3cf3ba90cc0bf6a0 - The artifact of the contour bug, for the curious: escrow job 69 exists, unfunded, forever - a cheap lesson at 0.01 USDC.
Shipped: durable execution journal, command dispatch with structural idempotency, sweeper recovery, system steps with typed denials, supply-chain escrow adapter - audited through nine adversarial rounds to zero criticals and zero highs, and proven on a live shipment whose operator died twice on the way.
Don't certify. Measure.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.





