Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 17, 2025

Description

This PR attempts to address Issue #9314. When messages are queued during attempt_completion, they are now processed as user feedback instead of being ignored and having the completion auto-accepted.

Problem

Previously, if a user queued messages while a task was finishing (particularly in orchestrator flows), the attempt_completion would be automatically accepted without processing the queued messages. This caused issues where users had to go back to subtasks and re-send messages.

Solution

  • Added a check in AttemptCompletionTool to detect queued messages before auto-accepting
  • When queued messages are detected, they are dequeued and processed as user feedback
  • The completion is not auto-accepted, allowing the task to continue with the user's input
  • Added comprehensive tests to verify the new behavior

Testing

  • Added new test suite for queued message handling
  • All existing tests continue to pass
  • Verified that normal completion flow works when no messages are queued
  • Verified that queued messages are properly processed as feedback

Fixes #9314

Feedback and guidance are welcome!


Important

This PR prevents auto-acceptance of task completion by processing queued messages as user feedback in AttemptCompletionTool.ts.

  • Behavior:
    • In AttemptCompletionTool.ts, added check for queued messages before auto-accepting task completion.
    • If messages are queued, they are processed as user feedback, preventing auto-acceptance.
    • Normal completion flow proceeds if no messages are queued.
  • Testing:
    • Added tests in attemptCompletionTool.spec.ts to verify queued message handling.
    • Tests ensure queued messages are processed and normal flow is maintained when no messages are queued.

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

…queued

- Check for queued messages before auto-accepting completion
- Process queued messages as user feedback instead of accepting
- Add tests for queued message handling during attempt_completion

Fixes #9314
@roomote
Copy link
Contributor Author

roomote bot commented Nov 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review completed. Found 1 issue that needs attention:

  • Queued message check is placed after subtask handling, which means it won't work for orchestrator subtasks (the primary use case mentioned in the issue)

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

Comment on lines +83 to +102
// Check if there are queued messages before auto-accepting
const hasQueuedMessages = !task.messageQueueService.isEmpty()

// If there are queued messages, don't auto-accept the completion
// Instead, process the queued messages first
if (hasQueuedMessages) {
// Get the first queued message
const queuedMessage = task.messageQueueService.dequeueMessage()
if (queuedMessage) {
// Add the queued message as user feedback
await task.say("user_feedback", queuedMessage.text ?? "", queuedMessage.images)

const feedbackText = `The user has provided feedback on the results. Consider their input to continue the task, and then attempt completion again.\n<feedback>\n${queuedMessage.text}\n</feedback>`
pushToolResult(formatResponse.toolResult(feedbackText, queuedMessage.images))

// Process any remaining queued messages
task.processQueuedMessages()
return
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queued message check is placed after the subtask approval logic (lines 70-81), which means subtasks will bypass this check entirely. Since the issue mentions orchestrator flows (which use subtasks), queued messages during subtask completion will still be ignored. The check should be moved before the if (task.parentTask) block to ensure both regular tasks and subtasks handle queued messages.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Orchestrator - Queued messages during "attempt_completion" cause the completion to be automatically accepted instead of messages sent

3 participants