Pair with Claude on your repo
This page starts Claude Code on your repo in a cloud sandbox, detaches from it, and reattaches. The sandbox keeps running after you close the terminal, for up to --idle (30m by default).
-
Start Claude from your repo.
Terminal window cd ~/src/my-repogit pushdroneship run claudeThe sandbox clones your repo’s
originat your current branch, so push first. Claude opens in your terminal, and you work with it as you would locally. With no key sent, it uses the API key you saved in the console, or else you sign in to your Claude plan inside the sandbox. Harnesses and models has the other ways to pay. -
Step away.
To detach, press Enter, then type
~and.. Or close the terminal. Claude keeps running for up to--idle(30m by default):detached; claude keeps working in <id> — droneship run claude to reattachwith nobody attached, the sandbox's idle timeout still appliesFor longer, raise
--idlewhen you start the sandbox (for exampledroneship run claude --idle 4h), or hand the work off with-p. See Auto-stop. -
Come back to it.
Terminal window droneship run claudeReattaching to <id> (you/my-repo@main)From the same repo,
run claudefinds your existing sandbox and attaches you to Claude’s session. The session isn’t restarted. -
Open a shell beside Claude.
Terminal window droneship shell # an interactive shell in the sandboxdroneship shell --id <id> git status # one command, then back to your laptopUse
--idwhen you have more than one sandbox.droneship listshows the ids. -
Stop it, or let it stop itself.
Terminal window droneship kill <id>Terminated sandbox <id> (local SSH key discarded)With nobody connected, the sandbox shuts down after 30 minutes idle. It also shuts down after 8 hours regardless. Its workspace is saved in both cases, so the next
droneship run claudein this repo starts with those files.
What you’ll see in the console
Section titled “What you’ll see in the console”The Sandboxes page in the console lists the sandbox with its harness, repository and branch, status, time running, and when it auto-stops. Open it to see its isolation level and egress policy.
How it works
Section titled “How it works”Claude runs in a tmux session inside the sandbox, so a dropped connection doesn’t stop it. By default Claude doesn’t ask for permission before each command; the sandbox is the boundary. Pass --ask to turn the permission prompts back on.
run claude reattaches only to a sandbox for the repo you’re in, and prefers one on your current branch. If it finds yours on another branch, it attaches anyway and says how to switch:
<id> is on main; you're on feat/login here. In the sandbox: git fetch origin --tags && git checkout feat/login, or a separate one: droneship run claude --new --ephemeralOptions that are useful while pairing:
droneship run claude --model opus # choose Claude's modeldroneship run claude -- --verbose # pass flags through to claudedroneship run claude -L 3000 # forward port 3000 to your machinedroneship shell -L 3000 # the same, from a shelldroneship run claude --new # another sandbox instead of reattachingA second sandbox on the same repo needs --ephemeral, because the saved workspace holds one sandbox at a time. Run several agents in parallel covers it. Every flag is in droneship run and droneship shell.
- Review and land the agent’s work:
diff,pullandprfrom your checkout. - Hand off a task: give Claude a prompt and come back to the result.
- Pick up where it left off: reopen a past conversation.