Skip to content

Commit e742511

Browse files
authored
fix: prevent infinite loop when attempt_completion succeeds (#9325)
1 parent 3091506 commit e742511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/tools/AttemptCompletionTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ export class AttemptCompletionTool extends BaseTool<"attempt_completion"> {
8383
const { response, text, images } = await task.ask("completion_result", "", false)
8484

8585
if (response === "yesButtonClicked") {
86-
pushToolResult("")
8786
return
8887
}
8988

89+
// User provided feedback - push tool result to continue the conversation
9090
await task.say("user_feedback", text ?? "", images)
9191

9292
const feedbackText = `The user has provided feedback on the results. Consider their input to continue the task, and then attempt completion again.\n<feedback>\n${text}\n</feedback>`

0 commit comments

Comments
 (0)