From 6e86f04a74a3c174ab6928f7ff9012be016083cb Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Wed, 30 Apr 2025 11:31:10 -0400 Subject: [PATCH] Make retries respect the global auto approve checkbox (#3067) --- src/core/Cline.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Cline.ts b/src/core/Cline.ts index 93e9c0f12a..4779275ff3 100644 --- a/src/core/Cline.ts +++ b/src/core/Cline.ts @@ -930,7 +930,7 @@ export class Cline extends EventEmitter { async *attemptApiRequest(previousApiReqIndex: number, retryAttempt: number = 0): ApiStream { let mcpHub: McpHub | undefined - const { apiConfiguration, mcpEnabled, alwaysApproveResubmit, requestDelaySeconds } = + const { apiConfiguration, mcpEnabled, autoApprovalEnabled, alwaysApproveResubmit, requestDelaySeconds } = (await this.providerRef.deref()?.getState()) ?? {} let rateLimitDelay = 0 @@ -1093,7 +1093,7 @@ export class Cline extends EventEmitter { this.isWaitingForFirstChunk = false } catch (error) { // note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely. - if (alwaysApproveResubmit) { + if (autoApprovalEnabled && alwaysApproveResubmit) { let errorMsg if (error.error?.metadata?.raw) {