From cbf0574d5ab399edbfbbc91040e8b1043aca4608 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 20 Aug 2026 19:05:10 -0700 Subject: [PATCH] revert: drop the unmarked-echo warning Measured on claude 2.1.237: interrupting a turn while a send is queued emits a top-level user frame carrying `[Request interrupted by user for tool use]` with no `isReplay` AND no `tool_use_result` - so it cleared every guard and made a perfectly healthy CLI log "sends will report delivery unconfirmed until the CLI stamps the marker". A false diagnosis. Worse, the one-shot latch is process-wide, so that one healthy interrupt permanently consumed the signal and a genuinely unmarked CLI could then never report itself. The warning was less than useless. Diagnosing this properly means warning only when a waiter actually times out having seen unmarked frames - more state in the function whose extra state has been the source of every defect in this review loop. The flag pin from the same round is the part that carries real weight; a real-binary assertion is the right complement and is recorded as follow-up. Found by the review loop on #15657. --- src/main/claude/claude-structured-dispatch.ts | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/main/claude/claude-structured-dispatch.ts b/src/main/claude/claude-structured-dispatch.ts index c7cd733f504..80585df1323 100644 --- a/src/main/claude/claude-structured-dispatch.ts +++ b/src/main/claude/claude-structured-dispatch.ts @@ -78,36 +78,11 @@ function isClaudeUserMessageReplay(message: Record): boolean { return message.type === 'user' && message.parent_tool_use_id === null && message.isReplay === true } -let warnedAboutMissingReplayMarker = false - -/** A CLI that echoes without the marker cannot be told apart at runtime from a - * turn that simply had no boundary inside the ack budget: both just report - * "delivery unconfirmed". Say it once so the cause is diagnosable. */ -function warnIfEchoLacksReplayMarker(message: Record): void { - if ( - warnedAboutMissingReplayMarker || - message.type !== 'user' || - message.parent_tool_use_id !== null || - message.isReplay !== undefined || - message.tool_use_result !== undefined - ) { - return - } - warnedAboutMissingReplayMarker = true - console.warn( - '[claude-structured] user frame arrived without isReplay while a send was waiting; ' + - 'sends will report delivery unconfirmed until the CLI stamps the marker' - ) -} - export function resolveClaudeReplayWaiter( session: ClaudeSession, message: Record ): void { const isUserReplay = isClaudeUserMessageReplay(message) - if (!isUserReplay && session.dispatchWaiters.length > 0) { - warnIfEchoLacksReplayMarker(message) - } const isCompletedCommand = message.type === 'result' if ( (!isUserReplay && !isCompletedCommand) ||