fix(cli): handle multimodal interrupt payloads in re-queue - #12751
Closed
nicoechaniz wants to merge 1 commit into
Closed
fix(cli): handle multimodal interrupt payloads in re-queue#12751nicoechaniz wants to merge 1 commit into
nicoechaniz wants to merge 1 commit into
Conversation
nicoechaniz
force-pushed
the
fix/interrupt-multimodal-requeue
branch
from
April 20, 2026 05:28
d6e069c to
b0dcde0
Compare
Contributor
Author
|
Hi @teknium1 — this fixes a crash when multimodal payloads (pasted images) get re-queued after Ctrl+C interrupt. Rebased on latest main and ready for review. Thanks! |
nicoechaniz
force-pushed
the
fix/interrupt-multimodal-requeue
branch
from
April 22, 2026 02:24
b0dcde0 to
37a2d8a
Compare
Collaborator
|
Related to #5202 — same multimodal interrupt requeue fix. May be duplicate. |
Collaborator
|
Related to #5202. |
When a user interrupts with an image paste/attachment, the payload is a tuple (text, images). The post-interrupt re-queue code did '\n'.join(all_parts) which crashed with: TypeError: sequence item 0: expected str instance, tuple found Split text and images from each part, combine text with join, and preserve image attachments so process_loop can unpack them normally.
nicoechaniz
force-pushed
the
fix/interrupt-multimodal-requeue
branch
from
April 22, 2026 07:21
37a2d8a to
26fcdb4
Compare
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a multimodal interrupt payload (e.g. pasted/attached images) is queued after Ctrl+C, the requeue logic in
HermesCLIcrashes because it tries to"\n".join()a list containing(text, images)tuples.Problem
The interrupt queue can contain tuples when the incoming message has image attachments. The existing code does:
This fails with a
TypeErrorwhenall_partscontains tuples.Fix
Normalize multimodal payloads before joining:
\nas before(combined_text, images)when images are presentTesting