Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 27, 2026

Related GitHub Issue

Closes: Linear issue EXT-639

Roo Code Task Context (Optional)

N/A

Description

Fixes a bug where queued messages containing only images (no text) would vanish after being dequeued without being shown in the UI or sent to the LLM.

Root cause: processQueuedMessages called submitUserMessage which sets askResponse values, but those values are only consumed when there is a pending ask(). When called after tool execution (no pending ask), the content was lost - this was especially problematic for image-only messages.

Fix: Changed processQueuedMessages to directly:

  1. Show user feedback in UI via say("user_feedback", ...)
  2. Add content to userMessageContent array for the next LLM request
  3. Handle image-only messages with hasText || hasImages check (previously the logic only worked when text was present)

Test Procedure

  1. Run the unit tests: cd src && npx vitest run core/task/__tests__/Task.spec.ts
  2. All 37 tests pass including:
    • "processes queued message after condense completes" - verifies text+image messages work
    • "processes image-only queued messages correctly" - verifies image-only messages work (new test)
    • "does not cross-drain queues between separate tasks" - verifies queue isolation

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A - backend logic change, no UI changes

Documentation Updates

  • No documentation updates are required.

Additional Notes

Key changes in Task.ts:

  • processQueuedMessages() now directly adds queued message content to userMessageContent array
  • Uses formatResponse.imageBlocks() to convert image data URLs to proper Anthropic ImageBlockParam format
  • Wraps user text in <user_message> tags consistent with other user feedback handling

Get in Touch

N/A - this is an automated fix from Roo Code Cloud


Important

Fixes processQueuedMessages() in Task.ts to correctly handle image-only messages and updates tests to verify this behavior.

  • Behavior:
    • Fixes processQueuedMessages() in Task.ts to handle image-only messages by checking hasText || hasImages.
    • Directly adds image data to userMessageContent using formatResponse.imageBlocks().
  • Tests:
    • Adds test "processes image-only queued messages correctly" in Task.spec.ts to verify handling of image-only messages.
    • Updates existing test "processes queued message after condense completes" to include image handling.
    • Ensures queue isolation in "does not cross-drain queues between separate tasks" test.

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

Fixes EXT-639 where queued messages containing only images (no text)
would vanish after being dequeued without being shown in the UI or
sent to the LLM.

Root cause: processQueuedMessages called submitUserMessage which
sets askResponse values, but those values are only consumed when
there is a pending ask(). When called after tool execution (no
pending ask), the content was lost.

Fix: Changed processQueuedMessages to directly:
1. Show user feedback in UI via say("user_feedback", ...)
2. Add content to userMessageContent array for the next LLM request
3. Handle image-only messages with hasText || hasImages check

Added test to verify image-only queued messages work correctly.
@roomote
Copy link
Contributor Author

roomote bot commented Jan 27, 2026

Rooviewer Clock   See task on Roo Cloud

Review completed. No issues found.

The fix correctly addresses the root cause where queued messages containing only images would vanish because processQueuedMessages() previously called submitUserMessage() which sets askResponse values only consumed when there's a pending ask(). The new implementation directly adds content to userMessageContent for the next LLM request.

Changes verified:

  • hasText || hasImages check properly handles image-only messages
  • formatResponse.imageBlocks() correctly converts data URLs to Anthropic ImageBlockParam format
  • UI feedback is shown via say("user_feedback", ...)
  • Tests cover text+image, image-only, and queue isolation scenarios

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.

1 participant