Isolated, ready-to-run git worktrees for coding agents#
One directory per worktree name — cut fresh from origin, dependencies warm
from a shared cache, your agent launched inside. Host-native, or sealed in a
Docker sandbox.
Name the branch up front (treebox create fix-auth) or don't: an unnamed
worktree gets its own directory and a treebox/<petname> placeholder branch
that can't be pushed — the agent renames it when the work takes shape. Agents
work the same repo in parallel without collisions — on a laptop or over
plain SSH.
Why treebox#
-
One directory per worktree
git worktreeunder the hood — parallel agents, no shared files, indexes, or dev servers. Branches are named later, when the work has taken shape. -
Never silently stale
createbranches from a freshorigin/<base>after a required fetch; a failed fetch exits loudly instead of building on old refs. -
Warm in seconds
Installs hardlink from shared caches (
~/.cache/uv, the pnpm store, …).enterre-syncs only when the lockfile changed (an interrupted setup is finished rather than skipped). -
The sandbox config lives outside the box
The container is rendered from your operator template, never mounted — a boxed agent can't edit its own cage.
Two isolation modes, one pipeline#
Provisioning is identical either way; a pluggable isolation mode decides where the agent runs:
--isolation |
Sandbox | Agent runs in |
|---|---|---|
host (default) |
none | the worktree shell |
docker |
sandboxed | a docker container, with your .env + caches mounted |
treebox create fix-auth # branch fix-auth off fresh origin/main
treebox create fix-auth --isolation docker # same provisioning, sandboxed
Docker isolation needs exactly one extra thing: Docker — see what each isolation mode needs.
What it is — and isn't#
treebox does
- Provision isolated worktrees, one per worktree name
- Branch from a fresh
origin/<base>— never stale refs - Install deps from shared caches (uv, npm, pnpm, go, cargo)
- Copy your
.envand submodules into place - Launch
claude/codexwith your subscription login - Speak script: stable exit codes,
--json,--dry-run
treebox doesn't
- Manage API keys — agents launch with your subscription login
- Review, merge, or push your branches
- Trust the target repo's config — its container config and hooks are ignored
- Isolate anything in
hostisolation — that's whatdockeris for - Replace CI, or orchestrate fleets of agents
- Install a package manager behind your back
Sixty seconds, end to end#
treebox doctor # verify the host is ready
treebox create # provision + launch claude (name generated)
treebox enter brave-otter --harness codex # re-enter later; -H overrides the recorded harness for this session
treebox list # what exists, what's stale
treebox teardown brave-otter --delete-branch
Five commands cover the core lifecycle — with template for docker sandbox
templates and version alongside. Install it, or read
how it works.
Built by Seth Peters — an operator-focused layer for coding-agent infrastructure: git worktrees, sandbox boundaries, subscription auth, and repeatable dev environments. Building in this space? Connect on LinkedIn.