From dbbb8b618673cafcd4f49a544921a0fdf3e641df Mon Sep 17 00:00:00 2001 From: brennanb2025 Date: Wed, 8 Jul 2026 16:46:23 -0700 Subject: [PATCH] docs(agents): clarify which prompts fold to unmatchable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unmatchable set is any prompt with no letters or digits (punctuation, whitespace, or symbol/emoji-only) — not just punctuation/whitespace. Comment only; no behavior change. Co-authored-by: Orca --- src/shared/prompt-echo-scanner.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shared/prompt-echo-scanner.ts b/src/shared/prompt-echo-scanner.ts index 2acbfe04ca7..829bfb6eb37 100644 --- a/src/shared/prompt-echo-scanner.ts +++ b/src/shared/prompt-echo-scanner.ts @@ -51,9 +51,10 @@ export function createPromptEchoScanner(pastedContent: string): PromptEchoScanne const folded = foldTerminalTextForEchoMatch(pastedContent) const head = folded.slice(0, SAMPLE_LENGTH) const tail = folded.length > SAMPLE_LENGTH ? folded.slice(-SAMPLE_LENGTH) : '' - // Why: only content that folds to nothing (punctuation/whitespace-only - // prompts) is genuinely impossible to match — treat any post-paste render as - // echo there rather than blocking delivery forever. Short-but-nonempty + // Why: only content that folds to nothing (no letters or digits — e.g. + // punctuation, whitespace, or symbol/emoji-only prompts) is genuinely + // impossible to match, so treat any post-paste render as echo there rather + // than blocking delivery forever. Short-but-nonempty // prompts (e.g. "fix ci") must still match on the head sample below so a // swallow screen that renders none of their characters withholds the submit // (#7466); firing on an arbitrary redraw would resubmit the exact bug.