Skip to content
Dhruv Pithadia
<- All work

02 · Systems

Lazarus

An agent that dies halfway through a payment workflow.

Durable, permission-bounded agent execution on CockroachDB. Kill the executor mid-task and a replacement picks up exactly the committed work, under the same limits.

Status
Public repo, 27 integration tests
Year
2026
Built with
TypeScript, Node, CockroachDB, SQL roles

The question

If an agent dies halfway through a task, what does the next one actually know? If a hostile instruction shows up inside the task data, does the agent stay in bounds only because the model chose to ignore it? If an action is refused, does anyone find out later?

Lazarus is my answer for one concrete workflow: kill the executor, keep the work, the limits, and the evidence.

The demo

  1. 01Provision a payment-incident workflow.
  2. 02Run disposable Node executors against it.
  3. 03Kill one with SIGKILL in the middle of the task.
  4. 04A replacement adopts the durable work from committed plan state, not from anyone's memory.
  5. 05Inject an out-of-scope instruction into the task data.
  6. 06Open the reasoning journal, the narrowed delegation, and the flight recorder to see what happened and what was refused.

Inside the engineering

  • Reasoning and the application effects it causes are written in the same transaction. A replacement trusts the database, not process memory.
  • Leases are fenced. A live lease is not casually stolen by a second executor.
  • Steps are idempotent. Repair markers separate work that still needs finishing from work that already committed.
  • Two authority layers: model proposals are checked against a warrant scope, and SQL roles independently restrict what the connection can touch.
  • Delegation only narrows. A child can be allowed to write a report without being allowed to read customer records or modify orders.
  • Refusals survive. Savepoints let an unauthorized operation fail without discarding the journal entry that records the refusal.
  • Audit endpoints run inside read-only database transactions.
  • Large logical timestamps stay strings in JavaScript, and rows from the same commit are not given an invented order.

Where it stands

The agent loop and console are on main in a public MIT repository, with 27 tests across five files run against a live CockroachDB setup. The runnable model provider is deterministic. There is no deployed demo, and memory work sits on a separate branch that has not been merged.

What it is not

It is not exactly-once external payments, regional disaster recovery, or immunity to prompt injection. It proves one thing properly: for the demonstrated database workflow, the work and its limits survive the executor.