Story Mode's prompt bar and the phone's Compose sheet send a prompt as two
writes: one bracketed paste, then a bare Enter about 120 ms later. Neither is
a `text\r` pair, so SubmitVerifier was never armed for them, and a send while
Claude Code was still ignoring Enter (2.1.277+, the first 30 to 50 s after the
composer paints) sat unsent.
PastedPromptWatch pairs the two writes back up, in Session.write() (the
WebSocket path) and writeViaMux() (the POST fallback's Enter), and arms the
verifier with the pasted text. Nothing may come between the two, and a newer
paste cancels a pending check, so Enter never sends the user's own paste.
The composer match learns what a pasted prompt looks like (measured on
2.1.303): continuation lines count for a short first line, and Claude's
`[Pasted text #1 +3 lines]` stand-in counts only when its line count is the
prompt's own. A prompt under 24 characters must now match whole, so a short
answer cannot read a dialog's highlighted `1. Yes` row as itself.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude Code 2.1.277 takes typed text the moment its composer paints but
ignores Enter for the first 30 to 50 seconds after it (measured 2026-09-19
through the input route: an Enter at 28 s stranded the prompt, one at 51 s
submitted it). The text+Enter pair `sendInput` sends 50 ms apart therefore
left every programmatic prompt sitting unsent, and every waiter burned its
timeout on a turn that never started.
Server: `SubmitVerifier` (session-submit-verifier.ts), armed from
`writeViaMux` for every mux write that carried a carriage return, reads the
pane on a 2 s to 60 s schedule and re-sends Enter only while the last
composer line (the CLI's own prompt glyph) still holds the head of what was
sent. An empty composer, other text, or no composer line at all ends it; a
newer write replaces the schedule.
Skill: `sendwait` gets the same loop (`_composer_text`, no-break space
stripped by its bytes for BSD sed) for servers that predate this, and the
preamble version moves to 1.30.1 so seeded agents pick up the fresh copy.
SKILL.md's heredoc and the plugin mirror are regenerated.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>