From 102d067022381fcfe89f935b6a49d391b45b9251 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 16 May 2026 01:56:04 +0900 Subject: [PATCH] fix(model-suggestion-retry): release reservation on async error path The promptWithModelSuggestionRetry async variant did not release the post-dispatch reservation when the wrapped promptAsync threw. Callers that immediately retry (such as sendSyncPrompt error toast paths) hit the gate as reserved and surfaced 'promptAsync skipped by gate: reserved' instead of the underlying error. Mirrors the existing sync variant fix from ff1b15d53. Closes regression introduced by BLOCKER-2 hardening --- src/shared/model-suggestion-retry.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/model-suggestion-retry.ts b/src/shared/model-suggestion-retry.ts index 19d2079f6..3113e962f 100644 --- a/src/shared/model-suggestion-retry.ts +++ b/src/shared/model-suggestion-retry.ts @@ -123,6 +123,7 @@ export async function promptWithModelSuggestionRetry( if (timeoutContext.wasTimedOut()) { throw new Error(`promptAsync timed out after ${timeoutMs}ms`) } + releasePromptAsyncReservation(args.path.id, "model-suggestion-retry") throw error } finally { timeoutContext.cleanup()