From 9114e647b9191dffe31a52b1a2488d54a7662f14 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 14:45:15 +0000 Subject: [PATCH] Add proper error tracking when CloudService is not available Co-authored-by: hannesrudolph <49103247+hannesrudolph@users.noreply.github.com> --- src/core/tools/WebSearchTool.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/tools/WebSearchTool.ts b/src/core/tools/WebSearchTool.ts index d8bd67c546..dd7c2a4c1f 100644 --- a/src/core/tools/WebSearchTool.ts +++ b/src/core/tools/WebSearchTool.ts @@ -58,12 +58,18 @@ export class WebSearchTool extends BaseTool<"web_search"> { const { CloudService } = await import("@roo-code/cloud") if (!CloudService.hasInstance()) { + task.consecutiveMistakeCount++ + task.recordToolError("web_search") + task.didToolFailInCurrentTurn = true pushToolResult(formatResponse.toolError("Cloud service not available")) return } const cloudAPI = CloudService.instance.cloudAPI if (!cloudAPI) { + task.consecutiveMistakeCount++ + task.recordToolError("web_search") + task.didToolFailInCurrentTurn = true pushToolResult(formatResponse.toolError("Cloud API not available")) return }