exec
execExecute shell commands with optional background continuation, PTY support, and timeout. Start work now and monitor completion via process tool or automatic output detection.
Instructions
Execute shell commands with background continuation for work that starts now. Use yieldMs/background to continue later via process tool. For long-running work started now, rely on automatic completion wake when it is enabled and the command emits output or fails; otherwise use process to confirm completion. Use process whenever you need logs, status, input, or intervention. Use pty=true for TTY-required commands (terminal UIs, coding agents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| pty | No | Run in a pseudo-terminal (PTY) when available (TTY-required CLIs, coding agents) | |
| command | Yes | Shell command to execute | |
| timeout | No | Timeout in seconds (optional, kills process on expiry) | |
| workdir | No | Working directory. Blank/whitespace values are invalid; omit to use the default cwd. | |
| yieldMs | No | Milliseconds to wait before backgrounding (default 10000) | |
| background | No | Run in background immediately |