timeout
Run a command with a time limit, automatically terminating if exceeded. Captures output and returns JSON to prevent runaway commands from blocking agent workflows.
Instructions
Run a command with a bounded time limit, automatically terminating it if it exceeds the duration. Captures stdout/stderr up to max_output_bytes. Returns JSON with command output and whether it timed out. Use to prevent runaway commands from blocking agent workflows. Not for introducing delays — use 'sleep' to pause. Not for CPU priority — use 'nice'. See also 'sleep', 'nice'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command_args | No | Command and arguments to run. | |
| dry_run | No | Report without running the command. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. | |
| seconds | Yes | Timeout in seconds. |