Skip to main content
Give your coding agent one prompt to set up Claude Code or Codex in a private devbox. It signs in with the subscription you already have, runs in the cloud, and you can reach it from anywhere. Once you’re finished, you’ll have:
  • An always-on Sailbox running Claude Code, Codex, or both, signed in with your Claude or ChatGPT subscription.
  • Optionally, a Slack bot that takes a task in a thread, works on its own branch, and replies with a pull request.
Why run it on Sail? Share this page with your coding agent or paste the prompt below.

Manual steps

1. Install the Sail CLI and sign in

You’ll need a Mac or Linux machine, an SSH key, and a Claude Pro or Max subscription, a ChatGPT Plus, Pro, or Business subscription, or both.
sail auth login opens your browser. A private devbox needs a login tied to your own account, not an organization service key. If you don’t have an SSH key, create one with ssh-keygen -t ed25519.

2. Create the devbox

Pick the agents you want with --with:
up creates a private Sailbox from the devbox image, installs the agents, adds an SSH shortcut such as my-agent.sail, and prints the Sailbox ID. Setting auto-sleep to never keeps the agent available while you’re away. It’s billed while it runs.

3. Sign in with your subscription

Open a shell on the devbox with sail box shell <sailbox-id>. Sign-in pages it opens appear in your local browser.For Claude Code, create a long-lived token. Sign in when the browser opens and paste the code back.
Save the token in a file only you can read, and load it now and in every new shell:
For Codex, sign in with your ChatGPT account:
Don’t set ANTHROPIC_API_KEY or OPENAI_API_KEY on the devbox. Either one switches the agent to API billing instead of your subscription.Check that each agent answers:

4. Start a session that keeps running

Start the agent in tmux, so it keeps working after you disconnect:
Reattach later with tmux attach -t agent. To work in your editor instead, see connect.

Connect Slack (optional)

The bridge listens for mentions over Socket Mode and runs Claude Code headlessly for each request. Every Slack thread gets its own git worktree, branch, and Claude session, so several threads can run at once. Replies in the same thread continue the same session. The agent opens pull requests and never merges them.

1. Create the Slack app

At api.slack.com/apps, choose Create New App, then From a manifest, and paste this. Change the name if you like.
Install the app in your workspace. Under Basic Information, create an app-level token with the connections:write scope. Invite the bot to a test channel, and copy your Slack member ID from your profile.

2. Give the agent its own user

The bridge runs as root and starts Claude as a separate agent user. The agent can’t read the Slack tokens or the bridge’s state. On the devbox, as root:
Create /root/slack-agent/.env with mode 0600:Quote any value that contains parentheses, as in the example above. The file is loaded by the shell, and an unquoted parenthesis breaks it.

3. Add the bridge

bridge.py
The bridge passes the agent only its Claude token and a minimal environment. It reads earlier messages in the thread before each run, so the agent knows what a follow-up refers to.

4. Start it and test from Slack

Run the bridge in tmux with a restart loop, so it comes back after a crash:
Check tmux attach -t bridge for bridge up as, then test from Slack:
  1. Mention the bot in the test channel with a small task. It reacts with 👀 while it works, then replies in the thread with a pull request link and ✅.
  2. Reply in the same thread without a mention, for example “also update the README”. It should continue on the same branch.
  3. Ask the bot something from an account that isn’t in AGENT_ALLOWED_USERS. It should stay silent.