Skip to content

fix(coding-agent): clear delivered image-only queue entries - #8612

Open
wutongyuonce wants to merge 1 commit into
earendil-works:mainfrom
wutongyuonce:fix/image-only-queue-state
Open

wutongyuonce wants to merge 1 commit into
earendil-works:mainfrom
wutongyuonce:fix/image-only-queue-state

Conversation

@wutongyuonce

Copy link
Copy Markdown
Contributor

Summary

  • remove delivered queue entries even when the user message has no text
  • keep image-only steering and follow-up pending counts in sync with the agent queue
  • cover image-only steering delivery with a regression test

Testing

  • npm run check
  • ./test.sh

Fixes #8581

@gaoanze888 gaoanze888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed exact head b67b3db2a. Removing the non-empty-text guard is correct because the session-side queues store text only, including "" for image-only messages, while delivery is authoritatively signaled by the user message_start event.

I checked both queue modes and the cross-queue ordering. Agent core always drains steering before follow-up, matching this handler's steering-first removal; multiple image-only entries are removed one at a time in FIFO delivery order. Initial image-only prompts cannot remove anything because no session queue record exists, and aborted/undelivered entries are not cleared because no corresponding user message_start occurs.

Validation:

  • queue suite plus local image-only follow-up / mixed steering+follow-up matrix: 17/17
  • exact-head merge into current origin/main applies cleanly
  • git diff --check

The old PR base's full build is currently affected by live generated-model/catalog drift in untouched AI provider files; the focused coding-agent lifecycle tests pass. No blocker found.

This comment is AI-generated by /wr

@wutongyuonce

Copy link
Copy Markdown
Contributor Author

Hi @mitsuhiko @badlogic — gentle bump. This PR is still open and mergeable. Happy to adjust anything once you have a chance to look. Thanks!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image-only queued messages leave pendingMessageCount stuck after delivery

2 participants