From 55dabfe321d2c5b03c46053bfc64e4d193dfd6a5 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Fri, 18 Jul 2025 12:48:17 +0000 Subject: [PATCH] fix: remove incorrect manual string replacement in tool repetition error message The ToolRepetitionDetector already handles tool name interpolation via the i18n system when calling t() with the toolName option. The manual .replace() call was trying to replace {toolName} but the actual placeholder is {{toolName}} (double braces), causing the tool name to never be properly interpolated in the error message. This fix removes the redundant manual replacement and lets the i18n system handle the interpolation correctly. Fixes #5879 --- src/core/assistant-message/presentAssistantMessage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/assistant-message/presentAssistantMessage.ts b/src/core/assistant-message/presentAssistantMessage.ts index ee3fa148b4..f2557b2da2 100644 --- a/src/core/assistant-message/presentAssistantMessage.ts +++ b/src/core/assistant-message/presentAssistantMessage.ts @@ -379,7 +379,7 @@ export async function presentAssistantMessage(cline: Task) { // Handle repetition similar to mistake_limit_reached pattern. const { response, text, images } = await cline.ask( repetitionCheck.askUser.messageKey as ClineAsk, - repetitionCheck.askUser.messageDetail.replace("{toolName}", block.name), + repetitionCheck.askUser.messageDetail, ) if (response === "messageResponse") {