ctxfs
Run twenty agents against one repository without any of them seeing another one’s mess.
Two agents, one repository
Each agent writes to its own layer. Git brings it back together.
This is the test that decides whether ctxfs works: two agents run at the same time in two contexts, both touch the same file, and the work comes back through plain git. Step through it, and look through either context to see which layer each file comes from.
| Path | base7bdb873, read-only | alphaupper layer | betaupper layer | C:\ctx\alphawhat it sees |
|---|---|---|---|---|
| package.json | • | no change | no change | base |
| src/index.js | • | M modified | M modified | alpha’s copy |
| src/util.js | • | no change | no change | base |
| src/cache.js | not in base | A added | no change | alpha’s copy |
| test/index.test.js | • | no change | M modified | base |
| docs/legacy.md | • | D deleted | no change | hidden by a whiteout |
| README.md | • | no change | M modified | base |
> ctxfs init --repo D:\src\webapp base pinned at 7bdb873e7caa > ctxfs run alpha -- claude created context alpha, mounted at C:\ctx\alpha claude edits, adds a file, deletes one, commits to a branch > ctxfs run beta -- claude created context beta, mounted at C:\ctx\beta a second agent, at the same time, in its own view > ctxfs status alpha alpha mounted base 7bdb873e7caa M src/index.js A src/cache.js D docs/legacy.md 3 paths changed; 3.1 KB in the upper layer > ctxfs reconcile alpha && ctxfs reconcile beta fetched alpha into refs/ctxfs/alpha/* fetched beta into refs/ctxfs/beta/* > ctxfs merge alpha beta --into main alpha fast-forward beta conflict: src/index.js exit 4
Ordinary git merges, one after another, in a separate worktree. The overlapping edit is an ordinary git conflict, left in place to resolve. The base is byte-for-byte what it was.
How it’s built
A filesystem, an index and git.
It’s written in Go and runs on Windows through WinFsp. ctxfs has no merge logic of its own; merges and conflicts are git’s.
baseOne pinned snapshot
A checkout of the repository at one commit. Every context reads from it, and its files never change.
ctxfs base updatemoves it, and refuses while any context exists.upperA layer per context
The first write to a base file copies it up into the context’s own layer. New files go there too. A delete leaves a whiteout that hides the base file.
manifestA SQLite index
Records what each layer holds, so
statusanddiffgrow with the size of the change. The size of the repository doesn’t matter.ctxfsdOne daemon
Serves every mount over WinFsp and answers the CLI over a named pipe. It handles 16 or more mounted contexts at once.
Where it stands
It works. It isn’t released.
The passthrough, overlay, git and hardening milestones are done, and a live Claude Code session has run inside a mounted context. On a 100,000-file repository, git status through a mount takes 1.6 s warm (142 ms on plain NTFS), inside its 3 s target. Large sequential reads run at about an eighth of native speed, which is still short of the goal. A Linux backend is an optional next step. There’s nothing to download yet.
# the recorded live run ctxfs run demo -- claude -p "Create a file named GREETING.txt …" > ctxfs status demo demo mounted base 7bdb873e7caa A GREETING.txt 1 path changed; 34 B in the upper layer
Capabilities
What it does.
Anyone whose parallel-agent experiment fell apart on the second git checkout.
- 01
A shared read-only snapshot, with a copy-on-write layer for each agent
- 02
Every view is a normal git repository, so merging work back is just a merge
- 03
Passthrough, overlay, git lifecycle and hardening milestones are done
- 04
Verified with a live Claude Code session running on a mounted view (
ctxfs run demo -- claude)
Specification
What it’s built with, and when.
Pulled from the repository each time this site is built.
- State
- In development
- Discipline
- Developer tooling
- Shape
- Developer tooling
- Started
- Jul 2026
- Last change
- Jul 2026
- Commits
- 66
- Go
- WinFsp
- SQLite
- git
Next
Put ctxfs in your pipeline
Ask about hooking it up to the repositories and agents you already run.