Back to all papers

Interchange Is Not Storage: Persistence Roles and Runtime Design for Durable AI Coding Agents

Chaitanya Mishra

Abstract

Long-running coding agents are often discussed as if they merely need more memory, larger context windows, or better prompts. The deeper systems problem is different. Once an agent becomes effectful, interruptible, resumable, concurrent, or auditable, persistence is no longer a matter of serializing a session object. It becomes a question of which state is authoritative, which state is only a checkpoint, which events record externally visible effects, and which substrate can recover these distinctions after failure.

This paper argues that many current stacks collapse four different persistence roles -- interchange, checkpointing, effect history, and primary system of record -- into one mutable session artifact, often JSON-shaped. That collapse is convenient for demos and bounded experiments, but it is architecturally weak for durable software work.

The paper develops a persistence-role framework and an operational-depth ladder for coding-agent systems, then uses them to analyze failure modes and compare JSON files, SQLite, and PostgreSQL. The main recommendations are deliberately narrow. Plain JSON remains useful for interchange, export, debug snapshots, and bounded checkpoints. SQLite is often the strongest default for local-first and single-node durable agents because it provides transactions, indexing, constraints, and crash recovery without a separate server. PostgreSQL is usually preferable once ownership, concurrency, audit, and operational governance become shared concerns.

The paper then compares BEAM-based runtimes with Ruby, Python, TypeScript/Node.js, Go, Rust, and Java. The result is not a language ranking but a control-plane analysis: BEAM changes the design space because supervision and failure isolation are runtime primitives, while other ecosystems remain competitive in narrower or differently structured envelopes. The paper concludes with a reference architecture and a proposed evaluation protocol for testing recovery claims in enterprise agent deployments.

Keywords

AI coding agents durable execution persistence roles SQLite PostgreSQL BEAM Elixir Erlang auditability workflow systems