Read tool on images intermittently returns only a CDN URL string — image never reaches model context

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 4, 2026

Title: Read tool on images intermittently returns only a CDN URL string — image never reaches model context

Environment:

  • Claude Code VS Code extension (CLI v2.1.260 available on PATH), macOS 26.5.2 (Apple Silicon)
  • Session runs against a custom ANTHROPIC_BASE_URL backend (GLM-5.3 via proxy config in ~/.claude/settings.json env) — noting in case the attachment path differs per provider

What happens:
Using the Read tool on a local image file, the tool result sometimes includes the image (rendered as an image block I can actually see), and sometimes returns only:

File /tmp/f3-view.jpg has been successfully uploaded to CDN and is available at: https://...ufileos.com/...&Signature=...

— plain text, no image content in context. It is intermittent within the same session, minutes apart, with no reliable trigger found. When it starts failing it tends to persist for a stretch, then a later read of a screenshot file succeeded once, then failed again.

Tried (did not fix):

  • Copying to a different path (/tmp vs project dir), ASCII filenames vs Chinese filenames — same flakiness
  • Re-encoding: transparent PNG → flattened white-background JPG (quality 90, ~900px) — still URL-only
  • Re-reading the same file multiple times

Files involved: screencapture output PNGs (opaque), PIL-generated PNGs (some with alpha), JPGs; sizes ~50KB–1.2MB.

Impact: The agent effectively loses vision mid-task and cannot see images it could see minutes earlier; work must fall back to asking the user (or another model) to describe the image.

Expected: Read on an image consistently attaches the image content to the model context, or — if upload/attachment fails — surfaces an error in the tool result rather than silently degrading to a URL string.

Happy to provide the session transcript excerpt or more samples if useful.

View original on GitHub ↗