Repository navigation
Description
Summary
Images pasted into a message that is sent while the agent is still processing (soft-interrupt path) are silently dropped. The model receives only the [image N] placeholder text, with no indication to the user that the attachment was lost.
Root cause
The soft-interrupt wire protocol has no image payload:
crates/jcode-protocol/src/wire.rs—Request::SoftInterrupt { id, content, urgent }carries onlycontent: String. Compare withRequest::Message { id, content, images, system_reminder }, which does carry images.crates/jcode-app-core/src/agent/interrupts.rs—SoftInterruptMessage { content, urgent, source }andqueue_soft_interrupt(content: String, ...)likewise have no images field.
So when the TUI submits a message with pending_images while a turn is running, it goes out as Request::SoftInterrupt and the base64 image data is discarded client-side. The [image N] placeholder that attach_image() inserted into the input (crates/jcode-tui/src/tui/app/input.rs) stays in the text and is the only thing the model sees.
Evidence (from a live session, jcode v0.61.0)
- User pasted a screenshot and hit Enter mid-turn. Server log at that exact timestamp:
SERVER_SOFT_INTERRUPT_QUEUE_RESULT id=3 session=... queued=true ack_queued=true - No
Agent received message with N image(s)log line for that message (this line is emitted unconditionally byrun_once_streaming_mpscincrates/jcode-app-core/src/agent/turn_execution.rswhen image blocks are present). On a previous day, when an image was sent while the agent was idle, the line appears and the image reaches the model. - API request payload (
messages_json_charsin KV_CACHE_USAGE logs) grew by only ~5.5 KB for the image turn — the text plus placeholder. A base64 screenshot would add hundreds of KB.
Expected behavior
Either:
- (preferred) extend the soft-interrupt path to carry images: add
images: Vec<(String, String)>toRequest::SoftInterruptandSoftInterruptMessage, and inject them asContentBlock::Imageblocks alongside the text at the injection point, or - at minimum, refuse/warn in the TUI when submitting images during a running turn ("image attachments can't be queued mid-turn, wait or cancel"), so the loss is not silent.
Repro
- Start any long-running turn (e.g. ask for a big analysis).
- While the agent is streaming/working, paste an image (screenshot) into the composer and press Enter.
- Observe: the message is queued as a soft interrupt, the model later responds as if no image was attached, and only sees
[image 1].
Environment: jcode v0.61.0, macOS, provider = Kimi Code (openai-compatible, vision-capable model k3). Provider/model is irrelevant to the bug — the drop happens before any API call.
Activity
1jehuang commentedon Jul 27, 2026
Implemented the reporter’s preferred end-to-end fix in #627. Soft interrupts now carry image payloads through the wire protocol, runtime and persisted queues, server dispatch, and both local and remote TUI submission paths. Queued attachments are injected as
ContentBlock::Imageentries, while legacy soft-interrupt payloads withoutimagesremain compatible through the serde default.Thank you to the reporter for the detailed root-cause analysis. It accurately identified the missing payload across the protocol, queue, and TUI paths and directly guided the implementation and regression coverage.
— Jcode agent (automated triage), on behalf of @1jehuang
fix(interrupt): carry image attachments through soft interrupts (fixes …
release: v0.62.0
fix(interrupt): carry image attachments through soft interrupts (fixes …
release: v0.62.0
release: v0.62.0
fix(interrupt): carry image attachments through soft interrupts (fixes …
release: v0.62.0
release: v0.62.0
release: v0.62.0
fix(interrupt): carry image attachments through soft interrupts (fixes …
release: v0.62.0
fix(interrupt): carry image attachments through soft interrupts (fixes …
release: v0.62.0