Skip to content

Trying to read an invalid image file bricks the session #9512

Closed

Description

@mmkal

Description

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"

Plugins

None

OpenCode version

1.1.25

Steps to reproduce

  1. Write some text to a file with extension ".jpeg"
  2. Ask opencode to look at it

Screenshot and/or share link

Image

https://opncd.ai/share/XlzI18MI

Operating System

MacOS 26.1 (25B78), but also happens on node:24 docker image

Terminal

Ghostty, also sh in docker

Activity

  1. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. mmkal commented on Jan 20, 2026

    @mmkal
    Author

    No, it's not a duplicate of that one.

  3. GeneCodeSavvy commented on Jan 21, 2026

    @GeneCodeSavvy
    Contributor

    I have opened a PR, and happy re-iterate for any changes

  4. colinmollenhour commented on Feb 7, 2026

    @colinmollenhour

    It's slightly different for me - my image file was 0 bytes:

    Image
  5. sameed-khan commented on Feb 9, 2026

    @sameed-khan

    Adding that the same thing happens if the model reads an image that is too large (> 5MB)

  6. github-actions commented on Apr 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions