Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 21, 2026

Summary

This PR attempts to address Issue #10855 by including operation context in the mistake_limit_reached error message. When users see "Roo is having trouble..." they now also get context about what operation was being attempted.

Changes

  • src/i18n/locales/en/common.json: Added new translation key mistake_limit_operation_context with value "While attempting: {{operation}}"
  • src/core/task/Task.ts:
    • Added getLastAttemptedOperationContext() helper method that extracts the last tool use from assistantMessageContent and formats a human-readable operation description (e.g., "write_to_file for 'path/to/file'")
    • Modified the mistake_limit_reached handling to prepend operation context to the error message

Example

Before:

Roo is having trouble proceeding. Please review the error message...

After:

While attempting: write_to_file for 'src/utils/helper.ts'

Roo is having trouble proceeding. Please review the error message...

Testing

  • All existing Task tests pass
  • TypeScript compiles without errors
  • Lint passes

Feedback and guidance are welcome!


Important

Adds operation context to mistake_limit_reached error messages in Task.ts for better user understanding.

  • Behavior:
    • Adds operation context to mistake_limit_reached error message in Task.ts.
    • Uses getLastAttemptedOperationContext() to extract and format operation context.
  • Localization:
    • Adds mistake_limit_operation_context key to common.json for error message context.
  • Testing:
    • All existing tests pass.
    • TypeScript compiles without errors.
    • Lint passes.

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

When the consecutive mistake limit is reached, users now see what operation
Roo was attempting when the failure occurred. This provides better context
for understanding the error.

Changes:
- Add mistake_limit_operation_context translation key to en/common.json
- Add getLastAttemptedOperationContext() helper method to Task class
- Modify mistake_limit_reached handling to prepend operation context

Refs #10855
@roomote
Copy link
Contributor Author

roomote bot commented Jan 21, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The implementation correctly:

  • Adds a new getLastAttemptedOperationContext() method that extracts the last tool operation from assistantMessageContent
  • Handles both ToolUse and McpToolUse types appropriately
  • Gracefully returns undefined when no tool context is available
  • Integrates properly with the i18n system

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants