Move a session to a sandbox
Move a long Claude Code or Codex run to a sandbox, so it keeps going with your laptop closed, and bring the work back
A long run does not have to keep your laptop open. Move the session to a sandbox and the agent picks up there, with your code and its conversation. When it is done, bring the work back as a branch, or move the session back.
Before you start
- The session is a Claude Code or Codex session.
- Its folder is in a Git repository inside your home folder, and the repository has a GitHub remote: the sandbox clones it from GitHub.
- The sandbox is a personal sandbox, or a new one you create in the dialog. Shared and organization sandboxes cannot take a move, and sessions on a shared computer cannot be moved.
- You are signed in, and this device holds your account key. The desktop app and the web console both move sessions.
- On a Mac, Git is version 2.38 or newer.
Move it
- In Sessions, pick the session and choose Move to sandbox….
- Pick a sandbox, or a new one. For a new sandbox, name it and pick a size.
- Tick any ignored files the agent needs. Ticked files replace files of the same name on the sandbox.
- Optionally, add setup: one command per line, run as you in the repository on the sandbox, in a terminal you can watch. Save for this repository keeps it for the next move. Without setup, the sandbox only clones the repository.
- Choose Continue on the sandbox. The agent keeps working while the sandbox prepares: it clones the repository, runs setup, and checks that the agent is signed in there and that it can push. If the agent asks for a sign-in on the sandbox, sign in yourself in the sandbox's terminal; the console never sees or types it.
- Pod Console waits for the agent to finish its turn, then stops it, captures the conversation and your changes, and restores both on the sandbox. If the agent has not finished its turn after 10 minutes, choose Move now (interrupts the agent), or keep waiting.
- The agent starts again on the sandbox, where it stopped.
When Move to sandbox… cannot be chosen, the dialog says why.
What moves:
- the conversation;
- your code: staged, unstaged and untracked changes, and the ignored files you ticked, up to 50 MiB of those;
- the API key you saved for the agent in Pod Console.
What does not: credentials, SSH keys and the agents' own settings.
After the move
The session on your computer is set aside, so it is not resumed after a restart. Its Resume becomes Fork here, and Open on the sandbox takes you to the running one. Badges show where it went, such as Moved to the sandbox.
Bring the work back
From the session on the sandbox:
- Push a branch pushes the sandbox's work tree, committed or not, to a new branch on GitHub and opens GitHub's compare page, ready for a pull request.
- Move back… moves the session back to the computer it came from, with its conversation and changes. If you changed the same files on your computer in the meantime, nothing in your folder is touched: the sandbox's work goes to a branch instead.
- Restore as a new session starts a copy of the session from its synced checkpoint, when the sandbox is gone or the move cannot finish.
Whatever comes back from a sandbox could have been changed by anyone who can read the sandbox.
Limits
- Linux sandboxes only.
- At most two moves at once on your account.
- The changes must be under 100 MB.
- Submodules with uncommitted or unpushed changes, and unpushed Git LFS objects, cannot move.
- Setup lines that need system packages are skipped: the sandbox's user has no
sudo.