Contents
Linux workspaces
On Linux, gitta can let many Claude Code worktrees share one checkout on disk. It can also run agents in a sandbox. Both are optional.
Shared checkout
A normal worktree is a full copy of the repository's files. Five agents on a large repository need five copies. With a shared checkout, every agent sees a full repository, but only the files it changes are stored separately.
gitta init sets this up for new Claude Code worktrees in the repository. gitta uses the best method that is available:
| Method | Used when |
|---|---|
| Kernel overlay | gitta runs as root. |
fuse-overlayfs | It is installed and gitta runs as a normal user. |
| gitta's own FUSE layer | FUSE is available. |
| Ordinary worktree | None of the above is available. |
Each agent still gets a real git worktree, with its own branch, HEAD and index. The agents share only the files, never their git state, so one agent's staged or committed work never shows up in another agent's worktree.
To make several workspaces at once, run gitta up -n 3 --backend overlay as root, or --backend fuse as a normal user. Each agent gets its own branch, gitta/a1, gitta/a2 and so on. In a repository where you already ran gitta init, the new agents join that setup and branch off your main branch, so you merge their work with git merge as usual. gitta down removes them again.
When the last worktree on a base commit goes away, gitta also removes the shared checkout of that commit, so old checkouts do not pile up.
gitta init --no-cow.Sandbox
The sandbox uses Linux Landlock. The kernel enforces it for the agent and every process the agent starts. The agent can read and write its own worktree and read system folders. It cannot reach your home folder, SSH keys, cloud credentials, the main checkout or other agents' worktrees.
Start agents in the sandbox with gitta run --sandbox, or run any command in it directly:
$ gitta-sandbox --workspace ../translate-api --no-net -- claude
$ gitta-sandbox --workspace ../translate-api --net-port 443 --write ~/.cache/pip -- claude| Option | Effect |
|---|---|
--read PATH | Also allow reading this path. |
--write PATH | Also allow writing this path, for example a cache folder. |
--no-net | No TCP connections and no TCP listening. |
--net-port N | Allow TCP connections only to these ports. |
Without --no-net or --net-port, the network stays open. Landlock's network rules cover TCP only. UDP, DNS lookups and raw sockets stay possible. For a complete network ban, run the agent in a network namespace as well, for example a container without a network or unshare -n.
File rules need Linux 5.13 or later. Network rules need Linux 6.7 or later. On an older kernel, --no-net and --net-port refuse to start instead of running with the network open. Nothing sits between the agent and its files.
Keep secrets out of reach of agents in any case.
To give each agent its own worktree, see Agents. For what gitta checks in agent changes, see Security and data.