timeout
Run a command within a bounded time limit and automatically terminate it if it exceeds the duration, preventing runaway processes from blocking 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 |
|---|---|---|---|
| dry_run | No | Report without running the command. | |
| seconds | Yes | Timeout in seconds. | |
| command_args | No | Command and arguments to run. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. |