Sandbox Sessions
Sandbox sessions give you a general-purpose Linux environment inside a dedicated microVM. You get shell access, HTTP command execution, file transfer, port forwarding, and optional persistent storage through workspaces.
Create a sandbox session
Interactive shell
Open an interactive PTY session:
If your project already lives on your local machine and you want to keep local files authoritative, use chaser dev instead of a raw shell session.
Run a one-shot command:
When you omit the target, free-tier accounts auto-spawn an ephemeral sandbox. Paid accounts reuse or bootstrap the default sandbox workspace for the active account. Use --ephemeral to bypass defaults explicitly.
The PTY endpoint is also available over WebSocket at GET /v1/sessions/{id}/pty with mode options: human (default), agent, or exec.
HTTP command execution
Run commands without managing PTY transport:
See Command Execution for background commands, streaming, and stdin control.
File transfer
Upload and download files through the API or CLI:
File transfer supports files up to 16 MB per operation.
Port forwarding
If your application listens on a port inside the sandbox, access it through:
- Direct URL:
https://<session_id>.chaser.sh/forward/<port>/ - Path style:
https://api.chaser.sh/s/<session_id>/forward/<port>/ - Local proxy:
chaser forward <session_id> <guest_port> [local_port]
Runtime self-test
Run the built-in diagnostic to verify the sandbox environment:
This returns structured details about the runtime: working directory, PATH entries, detected tools (Node, Python, Git, etc.), shell configuration, and Chaser environment markers.
OCI image support
- Ephemeral sessions accept an
imageparameter directly onPOST /v1/sessions. - Persistent sessions inherit the image from their workspace. Set the image when creating the workspace with
POST /v1/workspaces. - You cannot pass both
workspaceandimageon the same request.
Free vs paid defaults
- Free tier: workspace creation is disabled and targetless sandbox requests always run ephemerally.
- Paid accounts: targetless sandbox requests use the saved default sandbox workspace.
- First paid use: if no default exists yet, Chaser auto-creates one and reuses it on later runs.
MCP terminal tool
The terminal MCP tool is the recommended way for AI agents to interact with sandboxes. It auto-provisions or reuses a session and supports:
commandorcmd— run shell commandsxml— structured file operations (read_file,write_file,apply_edit,list_files)
The response includes the resolved session_id and workspace_id so follow-up calls can target the same runtime.