From e742511d90ccc801bc127c2cdeb4bc554cf154ba Mon Sep 17 00:00:00 2001 From: Daniel <57051444+daniel-lxs@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:24:48 -0500 Subject: [PATCH] fix: prevent infinite loop when attempt_completion succeeds (#9325) --- src/core/tools/AttemptCompletionTool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tools/AttemptCompletionTool.ts b/src/core/tools/AttemptCompletionTool.ts index 8a7695748b..b2cac7c4f2 100644 --- a/src/core/tools/AttemptCompletionTool.ts +++ b/src/core/tools/AttemptCompletionTool.ts @@ -83,10 +83,10 @@ export class AttemptCompletionTool extends BaseTool<"attempt_completion"> { const { response, text, images } = await task.ask("completion_result", "", false) if (response === "yesButtonClicked") { - pushToolResult("") return } + // User provided feedback - push tool result to continue the conversation await task.say("user_feedback", text ?? "", images) const feedbackText = `The user has provided feedback on the results. Consider their input to continue the task, and then attempt completion again.\n\n${text}\n`