Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

feat: improve 'no tools used' error handling with grace retry - #10196

Merged
hannesrudolph merged 3 commits into
mainfrom
feat/improve-no-tools-used-error-handling
Dec 18, 2025
Merged

feat: improve 'no tools used' error handling with grace retry#10196
hannesrudolph merged 3 commits into
mainfrom
feat/improve-no-tools-used-error-handling

Conversation

@hannesrudolph

@hannesrudolph hannesrudolph commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Summary

Improves the user experience when models fail to use tools by implementing a grace retry mechanism and displaying clearer, more informative error messages.

After the first instance of no tools being returned it simply retries without informing the user as this is "normal" behaviour from time to time.

After 2 consecutive responses without tools the user sees this.

image image

After repeated attempts (based on the error retry logic/setting, default 3) the user will see this

image

Changes

  • Add consecutiveNoToolUseCount counter in Task.ts to track consecutive "no tools used" errors
  • Only show the error message and count toward the mistake limit after 2 consecutive failures, giving the model one grace retry
  • Reset the counter when tools are successfully used or when the user manually aborts
  • Display user-friendly error messages in ChatRow with:
    • A clear title: "Model Response Incomplete"
    • An explanation of what happened
    • Expandable details explaining the retry behavior
  • Remove Gemini placeholder text emission for reasoning-only responses (no longer needed with improved error handling)
  • Add localized modelResponseErrors strings in all 18 locale files (ca, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW)

Important

Enhances 'no tools used' error handling with a grace retry mechanism and improved user messaging, including localization updates.

  • Behavior:
    • Adds consecutiveNoToolUseCount in Task.ts to track consecutive 'no tools used' errors.
    • Implements a grace retry mechanism: retries once without user notification, then shows error after 2 consecutive failures.
    • Resets counter on successful tool use or user abort.
    • Displays user-friendly error messages in ChatRow.tsx with detailed explanations.
  • UI:
    • Removes placeholder text emission for reasoning-only responses in gemini.ts.
    • Updates ChatRow.tsx to handle and display specific error messages for 'no tools used'.
  • Localization:
    • Adds modelResponseErrors strings to 18 locale files (e.g., ca/chat.json, de/chat.json, en/chat.json).

This description was created by Ellipsis for 3cdf701. You can customize this summary. It will automatically update as commits are pushed.

- Add consecutiveNoToolUseCount to track consecutive no-tool-use errors
- Only show error and count toward mistake limit after 2 consecutive failures
- Reset counter on successful tool use or manual abort
- Display user-friendly error messages with clear explanations in ChatRow
- Remove Gemini placeholder text emission for reasoning without content
- Add localized strings for model response errors in all 18 locales
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Dec 18, 2025
@ghost

ghost commented Dec 18, 2025

Copy link
Copy Markdown

Oroocle Clock   Follow along on Roo Cloud

Re-review complete. Previous issues appear resolved in the latest commit(s).

  • Remove duplicate "error" keys added to several locale chat.json files (JSON keeps the last value, can hide translation mistakes)
  • Align no-tools-used mistake counting: avoid incrementing consecutiveMistakeCount in both initiateTaskLoop() and the new grace-retry path
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.</sub>

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 18, 2025
Comment thread webview-ui/src/i18n/locales/ru/chat.json Outdated
Comment thread webview-ui/src/i18n/locales/de/chat.json Outdated
Comment thread src/core/task/Task.ts
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Dec 18, 2025
hannesrudolph and others added 2 commits December 18, 2025 15:12
…ble incrementing

- Remove duplicate 'error' keys from 13 locale chat.json files (ca, de, es, fr, hi, it, ja, ko, pl, pt-BR, tr, vi, zh-CN)
- Remove redundant consecutiveMistakeCount++ from initiateTaskLoop() - now handled solely by grace-retry logic in recursivelyMakeClineRequests()
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@hannesrudolph
hannesrudolph merged commit e2d1599 into main Dec 18, 2025
10 checks passed
@hannesrudolph
hannesrudolph deleted the feat/improve-no-tools-used-error-handling branch December 18, 2025 22:29
@github-project-automation github-project-automation Bot moved this from Triage to Done in Roo Code Roadmap Dec 18, 2025
@github-project-automation github-project-automation Bot moved this from New to Done in Roo Code Roadmap Dec 18, 2025
@cte cte mentioned this pull request Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants