ocean-graft: a full checkout per coding agent, in milliseconds

Copy-on-write session volumes for running coding agents in parallel. Each agent gets its own branch, its own .git, installed dependencies and its own port, and stores only what it changes.

GitHub Releases Architecture

Install

As a Claude Code plugin, from a terminal:

claude plugin install ocean-graft --marketplace viveky259259/ocean_fs

For Codex, Cursor, Gemini CLI, OpenCode or any MCP client, install the binary and register it:

curl -fsSL https://graft.getocean.dev/install.sh | sh
cd your-repository
ocean-graft setup all

The installer downloads the binary for your machine (macOS on Apple Silicon or Intel, Linux on x86_64 or arm64) from the latest GitHub release and checks it against that release's SHA-256 list. A binary that does not match is never installed. Read the script.

How you use it

cd ~/code/my-app
ocean-graft init --setup "npm ci"   # once: clone + install into the template
ocean-graft new search              # ~1.5 ms, warm, on branch ocean-graft/search
ocean-graft new tags
cd "$(ocean-graft path search)"     # point an agent here
ocean-graft ls                      # what every session has changed
ocean-graft conflicts               # overlaps and real conflicts, before anyone commits
ocean-graft import --all            # commits come back as ocean-graft/<name> branches

Measured

1.2–1.5 msto create a session (Linux, overlay)
13–15 msto create a session on macOS (APFS clone)
99 MBreally used by 100 sessions on a Mac
354tests against the real binary

Four agents worked one repository at once, one session each. ocean-graft conflicts found which pairs really conflicted before anything was merged, and all four dev servers ran side by side, each serving only its own change.

Four browser windows, one per ocean-graft session, each showing the notes app with that session's change
Four sessions, four dev servers, ports 4100–4130.

What the agent gets

Through the plugin or ocean-graft mcp, the agent operates ocean-graft itself:

ToolWhat it is for
statusThe project, every session, checkpoints, services, overlaps
forkNew sessions from the repository, a session or a checkpoint; count for best-of-N
checkpoint / rewindSave a state before a risky step; go back (a rewind can itself be undone)
conflictsWhich sessions would collide, before landing any
landRebase onto your branch, run the tests, fast-forward; never force
previewStart the session's dev server and hand you a URL
discardRemove a session, saving its work to a branch first

In Claude Code, hooks also give every claude --worktree session and every isolated subagent its own ocean-graft session, and checkpoint at the end of each turn.

Limits worth knowing

The overlay backend needs root on Linux; as an ordinary user ocean-graft uses reflink copies, which are full copies on filesystems without reflinks. --sandbox keeps an agent's commands from writing outside its session by mistake; it is not a security boundary against a hostile program and does not restrict the network. The full list is in the README.