Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 7, 2026

Simplifies the 'no assistant message' error path to match the simpler 'no tools used' pattern, improving UX for models like Grok that may repeatedly return reasoning-only responses.

Summary

This PR addresses ROO-411 by simplifying the complex retry logic for when models return only reasoning/thinking blocks without text or tool calls.

Changes

  1. Added format helper in

    • Provides consistent error messaging and instructions similar to
  2. Simplified retry logic in (lines 3522-3621)

    • Reduced from ~100 lines to ~15 lines
    • Matches the 'no tools used' pattern:
      • Increment counter
      • Show error only after 2 consecutive failures (grace retry on first)
      • Increment on second failure
      • Push prompt to
      • Let loop continue naturally
    • Removed complex auto-approval/manual retry branches that could cause poor UX or infinite loops

Benefits

  • Better UX: Simpler, more predictable retry behavior
  • Prevents infinite loops: No complex backoff/approval checks that could hang with models like Grok
  • Consistency: Both 'no tools' and 'no assistant message' errors now behave the same way
  • Maintainability: ~85 fewer lines of complex conditional logic

Testing

  • Type checking: ✓ Passed
  • Linting: ✓ Passed

View task on Roo Code Cloud

…used pattern

- Add noAssistantMessage() format helper to responses.ts
- Simplify the "no assistant message" else block (lines 3522-3621) from ~100 lines to ~15 lines
- Match the "no tools used" pattern: increment counter, show error after 2 failures, push prompt to continue loop
- Remove complex auto-approval/manual retry branches that could cause poor UX or infinite loops
- Fixes ROO-411
@roomote
Copy link
Contributor Author

roomote bot commented Jan 7, 2026

Rooviewer Clock   See task on Roo Cloud

All issues have been addressed. The fix correctly pushes the noAssistantMessage prompt to the stack and uses continue to retry, matching the "no tools used" pattern.

  • noAssistantMessage prompt is never sent to the model due to control flow issue (Task.ts:3538-3543) - Resolved in ab42a9c
Previous reviews

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

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 7, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Jan 7, 2026

Fixaroo Clock   See task on Roo Cloud

Fixed the control flow issue. The noAssistantMessage block now pushes to stack and continues the loop instead of falling through to return false.

View commit | Revert commit

@daniel-lxs
Copy link
Member

We need this logic if there's no assistant message to prevent the conversation to fall in an invalid state.

@daniel-lxs daniel-lxs closed this Jan 7, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 7, 2026
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 7, 2026
@daniel-lxs daniel-lxs deleted the feature/ROO-411-simplify-no-assistant-message branch January 7, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants