detachbox
PagesChoose and set up your agent

Choose and set up your agent

Open a terminal and Claude Code, Codex and OpenCode are installed, approvals are off and your project's instructions are in place. Pick the agent and a connected subscription or an API key from one of seven providers, and hand it the task.

Pick the agent

Open Terminals, pick New terminal and the project, then the Agent: Claude Code, Codex or OpenCode. Then pick the account under Runs on; the list offers only accounts that agent can use.

AgentHow it signs in
Claude CodeYour Claude subscription or a compatible API key; you can also sign in inside the terminal
CodexYour ChatGPT subscription or a compatible API key; you can also sign in inside the terminal
OpenCodeA compatible API key, or your own sign-in inside the terminal

Signing in inside the terminal works while you have no default account for that agent: pick the choice under Runs on that says the agent signs in inside the terminal. The agent asks you to sign in the way it does on your laptop, and the login is saved in that project's home folder, out of sight of your other projects.

The keys each agent takes:

  • Claude Code: Anthropic, DeepSeek, Z.ai, abliteration.ai.
  • Codex: OpenAI, xAI, DeepSeek, Z.ai, abliteration.ai.
  • OpenCode: Anthropic, OpenAI, xAI, DeepSeek, Z.ai, abliteration.ai, Gemini.

API keys shows how to add, rename and replace them.

The default launch of api: Claude Code on one of three Claude subscriptions, with a DeepSeek key and a Z.ai key also on offer, an optional model, and rotation across the Claude subscriptions as limits run out.

What your Compute ships with

Every terminal runs Ubuntu 26.04 LTS with sudo and Docker Engine with compose, and has these ready:

  • Agents: Claude Code, Codex and OpenCode.
  • Languages: Node 26, Python 3.14, Bun, uv, mise, pnpm, Yarn and pipx, with gcc and make from build-essential.
  • Tools: git, gh, glab, ripgrep, fd, fzf, jq, yq, bat, delta, git-lfs, httpie, tmux, tree, ncdu, htop, btop, rsync, strace, lsof, netcat, dig, ping, socat, zip, vim and nano.
  • Databases: psql, redis-cli, sqlite3 and the MariaDB client.
  • Browsers: Playwright with headless Chromium, linked into every home's Playwright cache, and chrome-headless-shell with CHROME_PATH set.

Go, Rust, Java and Ruby are one command away: mise use -g go@latest, mise use -g rust, and so on.

Docker and everything it runs have lower CPU and disk priority than the shell, tmux and the agent, so a heavy build leaves the agent and your typing quick. Every container runs under Docker's init, which collects finished processes.

Keep your own tools

Use sudo to install a system package in one terminal; ending or restarting the terminal removes it. To keep a tool, install it into the home folder, which belongs to the project:

  • mise use -g kubectl helm opentofu aws-cli puts those cloud CLIs there.
  • npm i -g <package> lands in ~/.npm-global, already on your PATH.
  • A binary you drop into ~/.local/bin runs in every terminal of the project.

Go builds with -trimpath in every home folder, so its build cache keeps one copy of each package instead of one per agent worktree path. Tests that find files next to themselves through runtime.Caller need it off: run go env -w GOFLAGS= in the project's terminal, or set GOFLAGS in the environment.

Fresh agents, tested first

We rebuild the base image every 6 hours, with system updates and the latest Claude Code, Codex and OpenCode, and check it before any terminal uses it. New and restarted terminals get the latest checked image; a running terminal keeps its current one.

The agents never update themselves mid-run: the version in a terminal is the one we tested. To move a terminal to the newest agents, restart it.

Approvals are off

AgentMode
Claude CodebypassPermissions
CodexApproval policy never, full access
OpenCodePermission allow

First-run screens and folder trust questions are answered already, the project folder included. Open a terminal and the agent is ready for a task.

Your project's instructions, and ours

Every agent starts in /work/<project>, so the project's own CLAUDE.md, AGENTS.md, .claude/ skills, hooks and settings, and its .mcp.json work as they do on your laptop.

Tell any agent to remember something for the project and it goes into AGENTS.md in the project's root. Claude Code, Codex and OpenCode all read that file, Claude Code even next to a CLAUDE.md.

On top of that, every agent reads /etc/detachbox/AGENTS.md, one short file of ours. It explains how preview URLs work, so agents hand you the link when a server is up. It is linked into ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md and ~/.config/opencode/AGENTS.md, and into the settings folder each launch keeps in the project.

Your own file in one of those places stays yours: detachbox only adds a reference to ours.

Open a page in your browser with detachbox-open

detachbox-open <url> opens an http or https link in the browser of the person at the terminal. xdg-open, open, sensible-browser, www-browser, x-www-browser and $BROWSER all point to it, so sign-ins started by gh, Python's webbrowser or an agent land in your browser.

A link to your Compute's own localhost:<port> becomes its preview URL. Other schemes, such as file:, are refused. With no browser on the terminal at that moment, it prints the link for you to open. The browser terminal shows what the dashboard does when a page arrives.

detachbox-preview <port> [path] prints the address a server on that port has in your browser, such as https://3000-<terminal ID>.detachbox.dev/admin. It warns when the server listens on localhost only or nothing listens on the port yet. Agents use it to hand you the link.

Hand an agent a prompt with detachbox-say

detachbox-say <tmux session> <text> delivers text as a new prompt through the agent in that terminal without simulating keystrokes, so a line you are typing stays intact. It works with Claude Code and Codex.

The server uses it to type "continue" when a limit resets. Exit code 3 means the terminal has no running Claude Code or Codex to deliver to, and 4 means the agent did not take the text; in both cases the server types it into the terminal instead.