respond
Send text input to a running command that is waiting for input. Works for interactive prompts, passwords, or shell inputs.
Instructions
Send text input to any running command (status="partial"). This is the
general-purpose "write to stdin" tool — works for interactive prompts
(y/n, passwords), shell commands, or any text the process expects.
Auto-appends \n if missing.
NOTE ON MULTIPLEXERS: For commands running inside zellij/tmux, prefer
the multiplexer's own CLI (e.g. `zellij action write-chars`) via
`execute` instead of `respond`. Reasons:
1. Output quality: `respond` returns the TUI's raw screen rendering
(borders, status bar, ANSI redraws), not clean command output.
2. Coupling: `respond` requires the original partial command_id to
stay alive; the CLI approach is stateless — the daemon survives
independently.
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) |