Pasted images aren't accessible to the agent via file path (Claude Code Desktop)

Open 💬 0 comments Opened Jun 24, 2026 by victorrentea

Summary

When a user pastes an image directly into a Claude Code conversation, the image is visible to the model in the message context but is not saved to disk in any location the agent can reach via its file tools (Read, Bash, etc.).

This forces a clunky out-of-band workaround:

  1. Agent says "I can't access the image you pasted — please save it to ~/Downloads/foo.png and tell me where it is."
  2. User screenshots / copies the image again, opens Finder, drags it to Downloads, renames it, and replies with the path.
  3. Agent picks it up.

Every paste-an-image-then-do-something-with-it interaction is gated on the user doing this manual step.

Workaround I just discovered (and which is what I'd love to be standard behavior)

The base64-encoded image payloads are actually persisted into the project session transcript at:
~/.claude/projects/<encoded-cwd>/<session-id>.jsonl

…inside each user message's content array as {type: "image", source: {data: "...base64..."}} blocks. So the agent CAN, in principle, recover them — but only by knowing about the transcript file structure, walking it, and base64-decoding. That's hidden plumbing, not a feature.

What would be ideal

Either:

  • A. Auto-save each pasted image to a stable, predictable location (e.g. $CLAUDE_TURN_DIR/pasted/<n>.png) and surface the path to the agent in the user-message metadata. Then the agent can just Read it.
  • B. Expose a first-class tool like ReadPastedImage(index) that the agent can call.
  • C. Document the transcript-walk recovery path as a stable, supported escape hatch — at least until A or B exists.

Option A is the cleanest UX. The current state is a real papercut for any UI/design/screenshot-driven workflow.

Environment

  • Claude Code Desktop, latest as of 2026-06-24
  • macOS 15.x

Reproduction

  1. In a Claude Code session, paste any image into the prompt (Cmd+V from clipboard, drag-drop from screenshot tool, etc.).
  2. Ask the agent to do something file-y with it (move it, resize it, embed it in a page, anything that needs a path).
  3. Watch the agent ask you to save it manually.

Happy to write a PR if a maintainer points me at the desktop client's IPC layer for the user-message context.

View original on GitHub ↗