Persistent Filesystem Access for Production AI Agents
Agents lose their work when compute ends unless the filesystem outlives the sandbox.

Persistent filesystem access is not a convenience for production AI agents. It is the line between a prototype that loses work and an agent that can actually finish long-running tasks reliably. The distinction shows up wherever compute is treated as disposable but the working set is not, and it determines whether multi-step agent work survives the boundaries that production systems cross as a matter of routine.
Why production agents lose work that ephemeral agents never had a chance to save
The failure is both mundane and total. An agent clones a repository, installs dependencies, reproduces a failing test, and gets three-quarters of the way through a fix. Then the sandbox hits its duration limit. The next run starts in an empty directory with the same task, the same prompt, and none of the evidence. Nothing crashed and nothing errored, but the work was never anywhere durable. The boundary is not the model, not the framework, not the quality of the prompts. It is whether state survives the compute lifecycle.
The loss is not a bug in the agent or in the model. It is a boundary condition. The execution environment and the durable state layer are different concerns, and a team that has not designed the second one does not have it. Disposability is the right default for compute, because compute should scale down when idle and scale up when work arrives. It is the wrong default for the working set, because the working set is what makes the next step possible.
Continuity also breaks at ordinary session boundaries, even with no crash or timeout. Teams running multi-step agents in production hit this first because their tasks last hours, not one prompt. That is the point where a persistence layer stops being an optimization and becomes a prerequisite. Platforms like Maritime, which pair persistent Firecracker micro-VMs with snapshot-restore scheduling, address this by ensuring an agent's workspace survives not just crashes but ordinary session boundaries, so multi-step tasks can outlive a single sandbox without losing their reasoning substrate.
What agent files actually are and why discarding them mid-task destroys reasoning, not just output
Agent files are everything an agent reads and writes inside its workspace while completing a task, not only the diff it produces at the end. Discarding them mid-task removes the agent's reasoning substrate, not just some files. A failing test log is the evidence that justifies the next edit. Coding agents use the filesystem as a native working medium the same way a developer does: grep for a symbol, open three files, edit one, run the test runner, read the failure, try again. Each step leaves state that the next step reads, and that loop is what breaks when the workspace is disposable.
This is a question of workspace continuity, which is related to but distinct from agent memory. Files hold what it can reopen, re-read, and verify. An agent deployed on persistent infrastructure with isolated storage can treat its working directory as a reliable continuity surface the same way a developer does: open files across sessions, inspect prior test output, and trust that intermediate patches and lock files will be there when the next step needs to verify or revert.
The three-layer state stack: what files cover, what they cannot, and where a database must carry the load

Filesystem persistence solves workspace continuity, but a production agent system runs three distinct persistence surfaces, and none of them substitutes for another. No persistence model restores running processes, open sockets, or in-memory state. Only what reached disk survives. Files solve workspace continuity, but durable metadata, permissions, and workflow state still belong in a database.
The three layers, as Cognee describes them, are a graph store for entities and relationships, a vector store for semantic embeddings, and a relational store for metadata, permissions, and pipeline state. A persistent VM with isolated storage handles workspace continuity, but durable metadata, permissions, and workflow orchestration belong in separate systems, each optimized for its own access patterns and failure modes. Always-on agents make this structural requirement explicit. The Always-On Agents survey defines them as systems whose future behavior depends on durable state accumulated across earlier interactions. That definition is structurally incompatible with any architecture that flushes state at session end.
The context window is working memory. If you treat it as storage, that decision is behind most production degradations. An agent that needs to re-run the tests or inspect the compiled output cannot retrieve its way back to that state.
How persistent filesystems decouple storage from the compute lifecycle
A persistent filesystem solves the continuity problem by giving the workspace its own identity, addressed independently of whichever compute runtime currently holds it. The model is two planes sharing one namespace. The workspace is unaffected.
Implementations share that shape regardless of vendor. Mounted drives and named volumes attach network-backed storage to a sandbox at a path, and they survive the sandbox that mounted them. Server-side workspaces keep the authoritative copy remote and expose file operations over an API or CLI. Remote filesystem layers present a path-based namespace across environments so the same workspace opens from any sandbox. In every case, the workspace gains an identity of its own, addressed by a token or ID rather than by whichever machine holds it. That identity is what enables handoff between sandboxes, parallel agents on the same repository, and cross-boundary inspection.
Execution stays disposable, and state does not. That is the correct default for both concerns. The mechanism is mechanical, and the reader can picture it: one plane that starts and stops, another that persists and is addressed independently.
Why micro-VM isolation is the right execution boundary for agents that touch the filesystem
Persistent filesystem access is only safe to grant an agent when the execution environment genuinely isolates one agent's filesystem operations from every other agent's. Containers do not provide that guarantee. The YoloFS paper, presented at SOSP '26, conducted a systematic study of 290 public reports and found agents wiping entire drives, destroying irreplaceable documents, and silently leaking credentials. Sandboxes block legitimate work while leaving accessible files unprotected.
Each micro-VM gets its own kernel running on hardware virtualization. A kernel exploit inside one VM cannot reach the host or other VMs, and two sandboxes share no kernel code paths, which fundamentally eliminates the lateral propagation of kernel vulnerabilities. The architectural advantage over containers is decisive for multi-tenant agent fleets: genuine kernel-level separation means one agent's destructive or compromised filesystem operation is contained to its own VM. The micro-VM boundary is what makes it architecturally viable to give each agent a real, writable filesystem without those permissions propagating outside the agent's own environment.
The agent-native filesystem primitives that follow from this isolation are introspect effects, undo mutations, and gate accesses. On 11 tasks with hidden side effects, YoloFS enabled agents to self-correct in 8 and staged all mutations for user review. Maritime implements the isolation principle directly: each agent runs inside its own isolated Firecracker micro-VM on bare metal, with a persistent disk and a real kernel, so the agent can install packages, run browsers, and break its environment without affecting any other agent or the host.
Snapshot-restore as the mechanism that makes persistent, isolated agents economically viable
VM-per-agent isolation would be prohibitively expensive if agents paid for compute while idle. Agent work comes in bursts: the CPU is busy for a few seconds per tool call and idle while the model thinks. An agent that pays for a full VM continuously pays for compute that is mostly idle. Snapshot-restore is the mechanism that decouples cost from uptime and makes per-agent isolation economically viable at scale.
Snapshot-restore captures the complete state of a running sandbox, including guest memory, virtual device states, CPU registers, and disk files, and writes that state to disk. Persistent filesystem access requires the second model. The first is just a faster way to lose work. The filesystem state is part of what the snapshot captures, so an agent that wakes from a snapshot resumes with its working directory, installed dependencies, and intermediate files exactly where it left them.
Bin-packing cuts toward dense multi-tenancy: one host holds many paused or idle agents, and the combination of sub-5-MiB-per-VM memory overhead and snapshot restore is exactly the technology that makes this cheap. Warm pools require keeping VMs live, which means paying for idle compute. Snapshot-restore eliminates the idle cost while preserving the state, so it is the right model for agents whose activity is bursty and unpredictable.
What production agents specifically need from their file layer beyond basic persistence
Surviving a restart is the minimum requirement for a persistent filesystem. Production agents need the file layer to also provide isolation per workspace, concurrency controls, and the ability to undo mutations without rebuilding the environment. The three production requirements are isolated workspaces so one attempt cannot corrupt another, concurrency controls for when several agents share a repository, and checkpoints with rollback so a bad edit sequence reverts without rebuilding. These requirements are about safety and repeatability, not just durability.
The YoloFS paper establishes three primitives that an agent-native filesystem should provide. The information gap that motivates these primitives is a production safety problem, not just a governance concern. Recent supply-chain attacks have targeted coding agents through compromised dependencies. A malicious dependency can silently read SSH keys and modify shell configuration while its build command looks innocuous. On 112 routine tasks, YoloFS reduces user interaction while matching the baseline success rate, which means agent-native filesystem primitives do not require sacrificing autonomy for safety.
The virtual filesystem pattern that is emerging stores data in a database but exposes it to the agent as files, decoupling the interface layer from the storage layer. Teams should also be explicit about what persistence cannot recover. No persistence model restores running processes, open sockets, or in-memory state. Only what reached disk survives, and multi-step workflows need to be designed with that boundary in mind.
The unsettled interface question: why agents use the filesystem and whether that will change
Agents gravitate toward filesystem interfaces not because the filesystem is the ideal interface but because they were trained on more filesystem interaction than any other computing surface. The persistence argument and the interface argument are separate questions, and conflating them leads to muddled architecture. The virtual filesystem pattern keeps them apart: the interface layer, what the agent sees as files, is decoupled from the storage layer, what actually persists, so the agent uses familiar filesystem primitives while the underlying storage is a proper database with indexing, locking, and schema validation.
The strongest objection to filesystem-native agents is that using the filesystem solves the storage problem, not the interface abstraction problem. Agents use the filesystem because they know bash from pretraining, not because it is the ideal way to reason about structured data or observability. A more strident version of the critique holds that the filesystem is the worst kind of database. That claim is accurate for raw-file implementations: agents that store state as literal files on disk accidentally reinvent search indexes, transaction logs, locking mechanisms, permission management, and schema validation, all the things databases solved decades ago, and they reinvent them badly.
For workspace continuity specifically, though, the critique misses the point. Cloned repositories, build output, dependency trees, and scratch notes are not data that wants a schema. They are the working materials of compilers, test runners, and package managers, and those tools expect a filesystem. A real filesystem is not a workaround here. It is the correct medium. The persistence requirement for always-on agents is not about interface preference. It is about whether the agent's accumulated history survives the compute lifecycle, and that requirement holds even if the interface later moves toward agent-to-agent communication or structured APIs. The practical conclusion is to use a persistent filesystem for workspace continuity, use a proper memory layer for what the agent learned, and keep durable metadata in a database. The interface question is evolving, but the persistence requirement is not.
What this means for developers building agent-native products today
The decisions that separate prototype agents from production agents are all resolvable with existing infrastructure. The barrier is not technical uncertainty but the choice to treat state as a first-class concern from the start. Teams running multi-step agents in production hit the persistence boundary first, and the right time to design the state layer is before the first multi-step task, not after the first catastrophic reset.
The per-user agent model is the right primitive for agent-native products. One persistent, isolated agent per user, rather than a shared stateless function, requires persistent filesystem access, VM-level isolation, and a scheduling model that does not charge for idle time. Always-on agents whose future behavior depends on accumulated history require governance at the infrastructure layer, and identity, state ownership, and access control are infrastructure concerns, not application-layer patches.
Maritime's architecture implements these principles directly. Developers go from code to a live API endpoint in a single push. The question is not whether persistent filesystem access is worth the infrastructure investment. The question is which infrastructure model makes it sustainable at the scale the product requires.


