Runs a Claude Code agent task with agent-runner and prints the streamed tools + metrics. The sandbox (when jailed) is always cleaned up.
# repo root, once:
bun install && bun run build
cd examples/agent-runnerLocal (uses your Claude Code login — works anywhere claude is installed):
bun start -- "Create fib.js that prints fib(30), run it, add a README"Jailed in an sbx sandbox (on a host with the sbx CLI):
AGENT_JAIL=1 bun start -- "Create fib.js that prints fib(30), run it, add a README"| Var | Purpose |
|---|---|
AGENT_JAIL=1 |
jail the run in an sbx sandbox (host with sbx) |
AGENT_MODEL |
model id (default sonnet) |
SBX_TEMPLATE |
sbx template/image with claude (default: the Docker Sandboxes claude-code template) |
After a jailed run, sbx ls shows no leftover sandbox — teardown is guaranteed (also on Ctrl-C).