Bug Description
When an image is sent via WhatsApp, warelay correctly downloads it to ~/.warelay/media/inbound/<uuid> but only passes a text reference to Claude CLI like:
[media attached: /Users/steipete/.warelay/media/inbound/69e31733-e657-4417-bc73-a65d8a538665 (image/jpeg)]
Claude CLI cannot actually read images from a path reference in text - it needs the image passed via the --images flag or some other mechanism.
Current Behavior
- Image arrives via WhatsApp
- warelay saves it to
~/.warelay/media/inbound/<uuid>
- warelay prepends
[media attached: <path>] to the prompt text
- Claude CLI receives this as plain text and cannot see the actual image
- Claude may hallucinate a description based on context
Expected Behavior
Images should be passed to Claude CLI via --images <path> flag so Claude can actually see and analyze them.
Relevant Code
In src/auto-reply/reply.ts:207-220:
const mediaNote = ctx.MediaPath?.length
? `[media attached: ${ctx.MediaPath}${ctx.MediaType ? ` (${ctx.MediaType})` : ""}...]`
: undefined;
Suggested Fix
When invoking Claude CLI and MediaPath is set for an image type, add --images <MediaPath> to the argv:
if (isClaudeInvocation && ctx.MediaPath && ctx.MediaType?.startsWith('image/')) {
argv.push('--images', ctx.MediaPath);
}
Environment
- warelay version: 1.2.0
- macOS
- Claude CLI invocation via command mode
Bug Description
When an image is sent via WhatsApp, warelay correctly downloads it to
~/.warelay/media/inbound/<uuid>but only passes a text reference to Claude CLI like:Claude CLI cannot actually read images from a path reference in text - it needs the image passed via the
--imagesflag or some other mechanism.Current Behavior
~/.warelay/media/inbound/<uuid>[media attached: <path>]to the prompt textExpected Behavior
Images should be passed to Claude CLI via
--images <path>flag so Claude can actually see and analyze them.Relevant Code
In
src/auto-reply/reply.ts:207-220:Suggested Fix
When invoking Claude CLI and
MediaPathis set for an image type, add--images <MediaPath>to the argv:Environment