forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingSomething isn't working
Description
App Version
3.25.10
API Provider
Not Applicable / Other
Model Used
Any
Roo Code Task Links (Optional)
No response
🔁 Steps to Reproduce
- set "Errors and Repeatition Limit" is 1
- Ask any questions to trigger tool calls
- You can see that the tool is called normally, but an error message is given at the end: This may indicate a failure in the model's thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").
💥 Outcome Summary
Expecting the tool to be called, but an error was reported
📄 Relevant Logs or Errors (Optional)
src\core\assistant-message\presentAssistantMessage.ts:370-409
// Check for identical consecutive tool calls.
if (!block.partial) {
// Use the detector to check for repetition, passing the ToolUse
// block directly.
const repetitionCheck = cline.toolRepetitionDetector.check(block)
// If execution is not allowed, notify user and break.
if (!repetitionCheck.allowExecution && repetitionCheck.askUser) {
// 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),
)
if (response === "messageResponse") {
// Add user feedback to userContent.
cline.userMessageContent.push(
{
type: "text" as const,
text: `Tool repetition limit reached. User feedback: ${text}`,
},
...formatResponse.imageBlocks(images),
)
// Add user feedback to chat.
await cline.say("user_feedback", text, images)
// Track tool repetition in telemetry.
TelemetryService.instance.captureConsecutiveMistakeError(cline.taskId)
}
// Return tool result message about the repetition
pushToolResult(
formatResponse.toolError(
`Tool call repetition limit reached for ${block.name}. Please try a different approach.`,
),
)
break
}
}
Metadata
Metadata
Assignees
Labels
Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done