HeadlinesBriefing HeadlinesBriefing.com

LayerFS: A Filesystem for AI Coding Agents

Hacker News •
×

LayerFS is a filesystem built for AI coding agents that need to work in parallel. Each agent mounts a complete, writable workspace over shared committed history, does its work, commits what it changed, and then goes away. The result is ephemeral workspaces paired with durable, shared results, allowing massive parallelism without a database server behind the scenes.

The system treats every file tool call as an atomic operation on a shared store. Each Bash call mounts an ephemeral workspace and commits when it finishes, so compute exists only while a command runs. Agents on different computers can share one serverless store, enabling distributed work where one project supports many branches and one branch supports many agents. Conflicts on the same file are refused and flagged, and each line can be traced back to the step that wrote it.

Forking is designed to be cheap. A fork is metadata and copies no files, so exploration can branch recursively to any depth. Content is deduplicated and compressed: in one illustrative example, 10 copies shrink to about 0.31 copies of storage. Dependencies such as node_modules travel with every mount, so a workspace is ready in roughly 0.05 seconds instead of the around five minutes that reinstalling typically takes.

LayerFS also supports automatic checkpoints that let agents rewind to any prior step, append-only objects that are never rewritten, and conflict rules that let the newest edit win for lockfiles, build output and caches. Edits cost only the size of the change rather than the size of the whole file.

Source: Hacker News · Summarized by HeadlinesBriefing