respond
Send text input to a command waiting for a prompt response. Use to answer prompts like [Y/n] or provide passwords.
Instructions
Send text input to a command that returned status="partial" and is
waiting at a prompt. Auto-appends \n if missing.
Example: respond(command_id, "y") to answer a [Y/n] prompt.
For control keys (Ctrl+C, arrows, F-keys, ESC, etc.) use send_control
instead — AI frameworks routinely strip control characters from string
arguments before this function ever sees them.
Returns the same format as execute.
Args:
- pause_timeout: seconds of OUTPUT SILENCE before returning (default 9.0).
Raise this (not total_timeout) when the response is expected to take
a long time to start producing output.
- total_timeout: hard cap on call duration (default 20.0). Only binds
while output is actively streaming.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command_id | Yes | The active command_id returned in a partial status response that is waiting for input | |
| text | Yes | The text input to send to the command (e.g. 'y' for prompts, passwords, etc.). Newline is auto-appended | |
| pause_timeout | No | Seconds of output silence to wait before returning (default is 9.0) | |
| total_timeout | No | Hard cap in seconds on the maximum duration of this call (default is 20.0) |