Skip to content

Pasted images lose their original file path #23801

Closed as not planned
Closed as not planned

Description

@0xWerz

When I paste an image into the prompt, the agent gets the image data but not the path. So if I say "copy this logo to the project" or "use this image," the agent has no idea where the original file is. It has to try to decode the base64 and save it manually, which doesn't really work.

What happens now:

Paste an image from disk → agent sees [Image 1] with raw pixel data → agent thinks "I don't have a direct file path" → tries to decode base64 and re-save the image, which breaks the workflow.

For example, I pasted an image and told the agent to copy it somewhere. It couldn't because there was no path to reference. It just got stuck trying to extract the image from the attachment instead of using the original file.

agent-thinking-no-path

What i think should happen:

If the image came from a file on disk, the agent should know the path so it can reference or copy it directly. Not sure how it should work for screenshots or copied image data, but at least for actual files this would save a lot of hassle.

Related: #17488

PR: #23802

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 22, 2026
  2. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

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

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions