You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trying to read an invalid image file bricks the session #9512
Hello! I found this bug by my application being dumb and writing some HTML to a .jpeg file. It breaks opencode, seemingly unrecoverably (other than by starting a new session).
Reproduction:
echo hello > /tmp/piccy.jpeg
opencode
# ask "what's in the image at /tmp/piccy.jpeg"# "Could not process image"# All prompts now get "Could not process image"
Activity
github-actions commentedon Jan 19, 2026
This issue might be a duplicate of existing issues. Please check:
mmkal commentedon Jan 20, 2026
No, it's not a duplicate of that one.
GeneCodeSavvy commentedon Jan 21, 2026
I have opened a PR, and happy re-iterate for any changes
colinmollenhour commentedon Feb 7, 2026
It's slightly different for me - my image file was 0 bytes:
sameed-khan commentedon Feb 9, 2026
Adding that the same thing happens if the model reads an image that is too large (> 5MB)
fix(session): sanitize image attachments before sending to API
github-actions commentedon Apr 10, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.