Use when the agent needs to interact with interactive CLI programs — programs that prompt for input, ask yes/no questions, require passwords, or run REPL sessions. Provides patterns for spawn, expect, sendline, branch handling, timeout/EOF management, cleanup, error diagnosis, log sanitization, retry, graceful exit, and agent-to-agent delegation with call-chain safety. Triggers on tasks like "automate this CLI", "script this interactive program", "handle the password prompt", "drive this REPL", "delegate to a sub-agent", or when the agent encounters a program that pauses for user input.
2026-07-23