openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

[claude-code] Pasted image attachments are dropped before the model (text-only)

Open nocstah opened this issue 3 months ago • 0 comments

Summary

With Claude Code (claude-code) as the brain, pasting image(s) into a chat saves them to disk but they are never delivered to the model. The message sent to the brain is text‑only, so the assistant responds as if no image was attached.

Environment

  • OpenHuman 0.63.7 (macOS desktop .dmg), Apple Silicon
  • Brain/provider: claude-code, model claude-opus-5 (vision‑capable)
  • Claude Code CLI: 2.1.237

What happens

Paste 1–2 images + text, send. The images are written to users/<user>/workspace/attachments/<hash>.jpg, but the Claude session receives only the text.

Evidence

  • Files on disk: workspace/attachments/<hashA>.jpg, workspace/attachments/<hashB>.jpg.
  • The corresponding Claude session .jsonl contains the typed text but zero references to the image filenames, no attachments/ path, and no {"type":"image"} content block.
  • The attachments dir is also outside the agent's granted dirs (--add-dir is ~/OpenHuman/projects), so even a path reference would be unreadable by the agent.

Root cause (hypothesis)

The claude-code provider doesn't translate attachments into the outgoing user message. The CLI accepts images via stream‑json content blocks ({"type":"image","source":{"type":"base64",...}}). OpenHuman should encode attached images into the message for this provider (as its cloud vision models presumably already receive them), and/or grant the attachments dir to the agent so a path reference is readable.

Repro

  1. Select Claude Code as the brain.
  2. Paste 1–2 images with some text, send.
  3. Image is saved under workspace/attachments/ but the model replies as if text‑only.

Expected

The brain receives pasted images — multimodal parity with the cloud models.

nocstah avatar Aug 21 '26 02:08 nocstah