Repository navigation
fix: deliver images sent during a Claude CLI turn instead of queueing them - #204160
vyctorbrzezowski merged 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets image messages reach an active local Claude CLI turn through an opt-in plugin capability. Example: Send a magenta PNG while Claude CLI is running three sequential sleep commands.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful image steering through existing owners, and inspection found no definite introduced code defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe session controller admits steering input, the shared CLI adapter hydrates its images and retains transcript custody, and the Anthropic plugin writes native stream-JSON messages to Claude Code. flowchart LR
A[Incoming image message] --> B[Session controller admission]
B --> C[Shared CLI steering adapter]
C --> D[Existing image loader]
D --> E[Anthropic native transport]
E --> F[Claude Code active turn]
F --> G[Acceptance and transcript recording]
Technical reviewBest possible solution: Extend the existing CLI input sink with optional image support, reuse shared hydration, and preserve native acceptance and transcript ownership. Do we have a high-confidence way to reproduce the issue? Yes: current-main admission rejects image steering without the CLI capability, matching the documented text-only contract and the author's reported Gateway reproduction; this review executed no target code. Is this the best way to solve the issue? The patch is a focused extension of the existing owners, and the added tests cover distinct admission and native serialization failures without introducing another queue or persistence path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ea0f17162ab. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +68, Tests +72, Docs +3. Total +143 across 12 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 23, 2026, 12:20 PM ET / 17:20 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
… them (openclaw#204160) * fix(claude-cli): deliver images sent mid-turn into the running turn * fix: check incoming Claude images when a run policy is installed
What Problem This Solves
When someone sends an image while local Claude CLI is working, the composer shows “Queued” until the turn ends. On a long turn that can take more than ten minutes, even though a text message sent at the same time can reach Claude at its next step.
User Impact
Claude can see an image before it finishes the current turn. If an installed
before_agent_runhook needs to inspect new input, the image still waits for the next turn. The hook sees it before Claude does. Other runtimes that do not support image steering keep their existing queue behavior.Why This Change Was Made
The plugin CLI input path previously supported text only. Claude CLI accepts native image blocks on its existing stream, so it can read the pixels rather than a note containing a file path. Plugins explicitly opt in with
acceptsImages. The shared CLI adapter loads images with the same scoped roots and limits as the first prompt, sends them in order, and records the message only after the native runtime acknowledges it. An image-only message does not add an empty text block.The existing admission check decides whether to steer or queue. A sink without image support, a permissions mismatch, or an installed run-policy hook keeps the input on the normal followup path. Node-placed Claude CLI sessions are unchanged. This PR does not change the “Queued” label or add a protocol field to explain why an input is waiting.
Evidence
Two isolated Gateways ran the actual Control UI and Claude CLI 2.1.311 on the tree published as
3416af6467dc. Each received one synthetic two-color PNG while Claude was using a timer tool:Both runs recorded one image-bearing model input and one durable user message with the attachment. Reloading the chat showed it once, with no input left pending. In the original baseline run, the image waited about 36 seconds for the turn to finish.
[text, image]/[image]cases also passed.712ae0338512..d04213c7e22bat P0–P2 and reported no actionable findings. The published commit has the identical tree (a101ae30db96). The two live trials cover local Claude CLI, not third-party runtimes.