- Strip ANSI escape sequences before matching sudo prompt - Normalize \r\n and \r to \n for reliable line splitting - Add 200ms delay before sending password (let PTY settle) - Increase buffer to 500 bytes for longer prompts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>