Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 18, 2026

This PR fixes ROO-320 where the UI gets stuck after a file write error (e.g., filename longer than 255 characters).

Problem

When the extension encountered an error while writing a file, the error handler was called but no tool result was returned to the LLM. This left the UI in a waiting state with buttons disabled, preventing the user from continuing.

Solution

  • Added pushToolResult() call in the error handler to return a properly formatted error message to the LLM
  • Extracted toolProtocol from callbacks to ensure error messages use the correct protocol format (XML or native)
  • Updated test to verify that pushToolResult is called with the error message when file write fails

Testing

  • Updated existing test case to verify error recovery behavior
  • All tests pass (24/24)
  • Type checking passes
  • Linting passes

View task on Roo Code Cloud


Important

Fixes UI hang by ensuring file write errors are communicated to LLM in WriteToFileTool.ts.

  • Behavior:
    • Adds pushToolResult() call in WriteToFileTool.ts error handler to return error message to LLM.
    • Extracts toolProtocol from callbacks to format error messages correctly.
  • Testing:
    • Updates test in writeToFileTool.spec.ts to verify pushToolResult is called with error message on file write failure.
    • All tests pass (24/24).

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

- Add pushToolResult() call in error handler to return formatted error message
- Extract toolProtocol from callbacks for error formatting
- Update test to verify pushToolResult is called with error message
- Fixes ROO-320: UI buttons getting stuck after file write errors
@roomote
Copy link
Contributor Author

roomote bot commented Jan 18, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The fix correctly ensures that file write errors are communicated back to the LLM by calling pushToolResult() with a properly formatted error message, preventing the UI from getting stuck.

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