[BUG] Inline images don't render in the VS Code extension sidebar (Remote-WSL): affects both `Read` and `SendUserFile`, plus a separate turn-injection bug in `Read`
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Three related image-delivery problems in the VS Code extension (Remote-WSL):
Readtool images never render in the VS Code sidebar. AReadcall on a PNG shows only a plain-text lineRead <filename>— no inline image, not clickable. The same call, viewed via a paired Remote Control mobile client in the same session, renders a correct thumbnail. So the image data is fine; only the VS Code sidebar fails to display it.Readtool leaks internal metadata as a fake user turn. When the displayed image is wider than ~2000px and gets downscaled, the very next turn contains an unprompted message with no user text, just[Image: original WxH, displayed at W'xH'. Multiply coordinates by R to map to original image.]. This is indistinguishable from the user pasting a new image and can make the model respond as if the user just sent something. Reproduced 6/6 times when downscaling was needed, 0/2 times when it wasn't.SendUserFilenever delivers visible image content. The tool call reports success ("1 file delivered to user"), but the VS Code sidebar shows nothing but the raw tool call text (no file chip, no image). On Remote Control mobile, a file card appears but with a red warning-triangle icon instead of the image. In an earlier session,SendUserFilefirst showed a broken red-exclamation thumbnail in VS Code, then later in the same session started failing withError: No such tool available: SendUserFile. SendUserFile is disabled for this session, in subagents as well as here.
Together, (1) and (3) mean there is currently no way to view an image inline in the VS Code extension sidebar under Remote-WSL. Screenshots attached below (VS Code side and Remote Control mobile side, same session, same calls).
Related: #66194 (closed, "use Read instead" was the accepted workaround — but per bug (1) above, that workaround does not hold in this VS Code + Remote-WSL setup) and #76739 (open, SendUserFile reports success but delivers nothing, macOS).
What Should Happen?
Readshould render the image inline in the VS Code sidebar (as it already does on the Remote Control mobile client).Read's internal coordinate-mapping caption, if generated, should stay attached to the tool result as model-facing metadata and should never be delivered as a new synthesized user turn.SendUserFileshould deliver a working inline image preview to the VS Code sidebar, consistent with what the tool call itself reports (success).
Error Messages/Logs
Error: No such tool available: SendUserFile. SendUserFile is disabled for this session, in subagents as well as here.
[Image: original 2100x900, displayed at 2000x857. Multiply coordinates by 1.05 to map to original image.]
(delivered as a new user turn with no accompanying user text — this is not a real error, but it is anomalous injected content, included here as evidence)
Steps to Reproduce
Bug 1 — Read tool images don't render in the VS Code sidebar:
- In the Claude Code VS Code extension (Remote-WSL), ask Claude to
Readany PNG file, e.g.:
````
Read /path/to/image.png
- Look at the sidebar transcript at the point of that tool call.
- Observe: only a plain-text line
Read <filename>appears, no inline image, not clickable to open the image. - (Optional, to confirm the image data is actually there) View the same session from a paired Remote Control mobile client — the same
Readcall renders a correct thumbnail there.
Bug 2 — Read tool's coordinate-mapping caption leaks as a spurious user turn:
- In a clean session, ask Claude to
Reada PNG image wider than ~2000px (e.g. 2100×900), so the client has to downscale it to fit the display width cap. - Observe the very next turn: a message appears with no user-authored text, only:
````
[Image: original 2100x900, displayed at 2000x857. Multiply coordinates by 1.05 to map to original image.]
- This message is delivered as if the user had just sent it, even though the user typed nothing.
- Control case: repeat with an image ≤2000px wide (e.g. 400×300, or exactly 2000×800) — no such message appears.
- Reproduced 6/6 times across repeated trials whenever the image required downscaling; 0/2 times when it did not.
Bug 3 — SendUserFile fails to deliver visible image content:
- In the Claude Code VS Code extension (Remote-WSL), have Claude call
SendUserFileon any PNG withdisplay: "render". - Tool call reports success, e.g.
"1 file delivered to user"— no error. - In the VS Code sidebar: nothing renders — only the raw tool call's IN parameters and
OUT 1 file delivered to user.shown as plain debug-style text, no file chip, no image. - On a paired Remote Control mobile client, same call: a file card appears (
PNG <filename>), but with a red circular warning-triangle icon (white "!" on red) in place of the image preview. - Reproduced 3/3 times with different small PNGs (400×300, 300×200).
Note: Bugs 1 and 3 mean there is currently no reliable way to view an image inline in the VS Code extension sidebar under Remote-WSL — the documented workaround for SendUserFile issues ("use Read instead," per #66194) does not actually work in this environment, since Read doesn't render inline there either.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.220
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment detail not covered by the dropdowns above: Windows host, with VS Code connected to WSL2 (Ubuntu-based) via the Remote-WSL extension; Claude Code accessed via the Claude Code extension for VS Code; authenticated via a claude.ai Pro subscription login (not a console.anthropic.com API key). Also tested the same session from a paired Remote Control mobile client for comparison (see screenshots).
Attached:
laptop_screenshot.png— VS Code sidebar showing the bareRead <filename>line (no thumbnail) and the rawSendUserFileIN/OUT text (no file chip, no image)phone_screen_shot.png— Remote Control mobile, same session:Readrenders a correct (cropped) thumbnail;SendUserFileshows a file card with a red warning-triangle icon instead of the image
<img width="1185" height="328" alt="Image" src="https://github.com/user-attachments/assets/72610e88-1687-476e-b711-31ab393e4fb4" />
<img width="1200" height="1521" alt="Image" src="https://github.com/user-attachments/assets/eb7e4ee3-161c-4f93-ab4c-75d966e32052" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗