Execute Experiment
execute_experimentRun shell commands in an isolated Docker sandbox for installs, builds, scripts, migrations, and exploration without exposing the host machine. Returns exit code, stdout, stderr, and duration to guide next attempts.
Instructions
Run a shell command inside a sandbox.
USE THIS for anything you would otherwise run in the developer's terminal: installs, builds, scripts, migrations, one-off exploration. The command runs in the container, never on the host.
RETURNS exit code, stdout, stderr and duration. A non-zero exit is a normal result, not an error -- read it and decide what to try next.
Set background=true for something long-running, then poll get_job_status and fetch get_job_result when it finishes. Otherwise this waits, bounded by the timeout, so it cannot hang your session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command. Runs via /bin/sh in the workspace. | |
| timeout | No | Seconds before the command is killed. Defaults to the experiment's. | |
| workdir | No | Working directory. Must be inside the workspace. | |
| background | No | Return a job id immediately instead of waiting. | |
| experiment_id | Yes | The experiment to run in. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| job_id | Yes | ||
| status | Yes | ||
| stderr | No | ||
| stdout | No | ||
| command | Yes | ||
| exit_code | No | ||
| duration_ms | No | ||
| experiment_id | Yes | ||
| stderr_truncated | No | ||
| stdout_truncated | No |