Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

agent-runner example

Runs a Claude Code agent task with agent-runner and prints the streamed tools + metrics. The sandbox (when jailed) is always cleaned up.

Setup

# repo root, once:
bun install && bun run build
cd examples/agent-runner

Run

Local (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"

Env

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).