A bb plugin that runs every thread in its own exe.dev VM.
- One VM per thread. Pick exe.dev VM in the new-thread environment picker. bb creates a VM, installs its daemon, checks out the project, and shows the machine as "exe.dev VM xxxxxx" under the composer.
- With or without a project. In a project the VM gets a project checkout; with "Don't work in a project" it gets a personal workspace directory.
- Pause when idle. After 15 idle minutes (configurable) the VM is paused. A VM whose agent is still working is never paused. exe.dev keeps its memory and disk; the next message resumes it.
- Cleaned up with the thread. Archiving the last thread on a VM deletes it.
- No session cap. Unlike Modal (24 h) or Vercel Sandbox, exe.dev VMs are ordinary long-lived VMs with persistent disks and real SSH.
Note
Experimental. Built on bb's experimental_machines /
experimental_environments plugin APIs, which may change. Not affiliated
with exe.dev or bb.
- bb ≥ 0.50 and a server address the VM can reach. Either:
- bb connect (Settings → bb connect): the VM reaches your server through getbb.app; or
- Tailscale: serve bb on your tailnet (
tailscale serve --https=443 http://127.0.0.1:38886,BB_APP_URLand Settings → Machines → Server URL set to thehttps://<machine>.<tailnet>.ts.netaddress, default machine accessdirect) and set a Tailscale OAuth client. Each VM then joins the tailnet before bb starts. See "Tailscale" below.
- An exe.dev account.
- Agent credentials for the VM, because your local Claude Code / Codex login
does not travel with it. Use bb's Account Pooler plugin, or set
CLAUDE_CODE_OAUTH_TOKEN(fromclaude setup-token) under Settings → Environment variables.
bb plugin install git:https://github.com/erikmay/bb-plugin-environment-exe-dev.git@^0.4.0Create an API token that can only manage VMs tagged bb:
ssh exe.dev "ssh-key generate-api-key --label=bb --tag=bb \
--cmds='whoami,ls,new,rm,pause,resume,ssh,stat' --exp=365d --json"Paste the token into Settings → Plugins → exe.dev VMs → apiToken, or:
bb plugin config environment-exe-dev set apiToken <token>| Setting | Default | Meaning |
|---|---|---|
apiToken |
— | exe.dev API token (secret) |
tailscaleOAuthClientId, tailscaleOAuthClientSecret |
empty | Tailscale OAuth client (secret); when set, every VM joins your tailnet with its own single-use key |
tailscaleTags |
tag:bb-sandbox |
Tags every VM joins with (required) |
idleMinutes |
15 |
Pause a VM after this many idle minutes; 0 disables |
cpu |
0 (exe.dev default) |
CPUs for new VMs |
memory |
exe.dev default | e.g. 8GB |
disk |
exe.dev default | e.g. 50GB |
image |
exeuntu |
Image for new VMs; exeuntu ships Claude Code, Codex, git and build tools |
createmakes a VM namedbb-<hash of bb's launch key>(retries reuse it), then installs Node.js 24 when missing and enables a persistent systemd user session so bb's daemon runs as a service.- bb's own bootstrap installs and enrolls its daemon through the plugin's
command runner (
vm.ssh; stdin goes through a temporary 0600 file). - Pause and resume map to exe.dev
pause/resume. Delete maps torm. - Idle tracking runs on your bb server, like bb's Modal plugin. If the bb server is asleep or stopped, nothing pauses idle VMs.
With a Tailscale OAuth client configured, the plugin installs Tailscale on each VM and joins it to your tailnet before bb bootstraps its daemon:
- It asks the VM for its Tailscale state first. A VM that is connected and reaches the bb server gets no key at all.
- Otherwise it mints a fresh auth key through the Tailscale API: single use,
ephemeral, pre-approved, with
tailscaleTags, valid for five minutes. - The VM runs
tailscale up --reset --force-reauthwith that key,--advertise-tags,--shields-upand--accept-routes=false, then must reach the bb server (machineServerUrl) within 30 seconds.
This also repairs a VM whose ephemeral node expired while it was paused
(Tailscale removes offline ephemeral nodes after 30 to 60 minutes). Before a
running VM is deleted, the plugin runs tailscale logout, so its node
disappears at once.
Create the OAuth client in the Tailscale admin (Settings → Trust credentials → OAuth client) with the Auth Keys: write scope and your sandbox tag. Limit the tag in your policy to the bb server only:
- Agents on a VM run with the permission mode you choose (often Full Access) and can read everything on that VM, including injected credentials.
- bb forwards the server's
ghlogin to non-primary machines asGH_TOKENby default. Prefer a fine-grained token scoped to the repositories you use (Settings → Environment variables). - The token scope above is the minimum this plugin needs.
- Idle detection counts thread activity and terminal input. A build or dev
server running in a bb terminal without keystrokes can be paused after
idleMinutes; raise it or set it to0for such work. - A turn that hangs as "working" keeps its VM from being paused.
- A VM whose bb machine is gone (for example after the exe.dev token changed)
is not deleted automatically;
ssh exe.dev lsshows it.
npm install
npm run typecheck && npm test
npm run test:live # against real exe.dev, needs EXE_TOKEN
bb plugin install . # from this checkoutAGENTS.md describes the architecture, invariants, releasing, and how to
follow bb upstream.
MIT. Parts of providers/ and server.ts are adapted from bb's Modal sandbox
plugin (MIT, © 2026 Michael Yong). See LICENSE.