Command Execution
Chaser provides multiple ways to run commands in sandbox sessions, from simple one-shot execution to long-running background processes with streaming output.
Auto-spawn exec
POST /v1/exec is the simplest way to run a command. It provisions a sandbox automatically (or reuses an existing one for workspace-backed requests) and returns the output.
Response fields (foreground): exit_code, output, output_truncated
In-session exec
POST /v1/sessions/{id}/exec runs a command in an already-running sandbox. Use this when you want to reuse an existing session.
Optional fields: cwd (working directory), env (environment variables), timeout_ms, background.
Background commands
Set background=true to start long-running processes without blocking the HTTP response. You get back a command_id and pid to manage the process.
Manage background commands
Stream output
Send input and signals
CLI one-shot
PTY WebSocket
For interactive terminal access, upgrade to a WebSocket:
Mode options: human (full interactive shell), agent (agent-optimized PTY), exec (non-interactive exec transport).
MCP terminal tool
The terminal MCP tool wraps sandbox execution with session auto-provisioning:
Jobs
For queued, retriable command execution, use the jobs API with sandbox.exec or pipeline.run:
See Jobs for scheduling, pipelines, and other job kinds.
