boxrouter launch codex --rm creates a sandbox that already has the agent installed and attaches the
agent’s terminal to yours. When you detach or the session ends, --rm requests sandbox deletion. The request returns
before deletion finishes, so the end state is destroyed only after you check it.
Before You Begin: A BoxRouter API key allowed to create sandboxes (set up your account) and a client: Python, TypeScript, or the CLI with jq. Run the CLI in an interactive terminal.
Pick an Agent
Launch It
create returns. It does
not attach your keyboard. The examples print Sandbox: <SANDBOX_ID> and leave the block, which requests
sandbox deletion. Call box.open_terminal() in Python or box.openTerminal() in TypeScript to start the agent in a terminal.
When the terminal attaches, the CLI starts
the agent, and Codex opens its sign-in screen because no model key was selected. To skip sign-in, launch
with a saved key (Catalog agents).
Press Ctrl-] to detach the terminal when you are done.
Confirm Cleanup
ReplaceSANDBOX_ID with the sandbox ID from the connection message.
destroying.
Run the command again until it prints destroyed; only destroyed confirms cleanup. If the state stays
live, run boxrouter destroy SANDBOX_ID and check again. If the CLI cannot confirm cleanup, run the
boxrouter destroy command it prints.
Without --rm, the sandbox can keep running and billing past the end of its lifetime (300
seconds by default). Run boxrouter destroy ID and check its state when you no longer need it.
If It Fails
Next Steps
Launch Your Own Agent
Run your code with a catalog agent, or launch your own manifest.
Supply an Agent's Secrets
Pass a model key into the sandbox without putting it in a manifest.
Choose a Catalog Agent
The agents you can launch without writing a manifest.