Run a long command and wait locally
run_and_waitExecute a single approved command and return its bounded terminal result after completion, eliminating polling for builds and tests.
Instructions
Run one approved non-interactive process and return one bounded terminal result.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"argv": "<argv>",
"cwd": "<cwd>"
},
"name": "run_and_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute working directory inside LONGRUN_ALLOWED_ROOTS. | |
| argv | Yes | Command and arguments as an array. Shell and privilege-elevation commands are disabled. | |
| tail_bytes | No | ||
| tail_lines | No | ||
| timeout_sec | No | ||
| failure_contains | No | ||
| grace_period_sec | No | ||
| success_contains | No | ||
| no_output_timeout_sec | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | ||
| tail | No | ||
| error | No | ||
| state | Yes | ||
| job_id | Yes | ||
| log_path | Yes | ||
| exit_code | Yes | ||
| duration_sec | Yes | ||
| failure_match | No | ||
| log_truncated | Yes | ||
| metadata_path | Yes | ||
| success_match | No | ||
| started_at_utc | Yes | ||
| command_display | Yes | ||
| finished_at_utc | Yes | ||
| output_bytes_seen | Yes | ||
| output_bytes_logged | Yes |