GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Pasting an image file loses the original path — model only gets an inline data: URL · Issue #48190 · anomalyco/opencode

Pasting an image file loses the original path — model only gets an inline data: URL #48190

New issue
Copy link
New issue
Copy link
Closed
#59833
Closed
Pasting an image file loses the original path — model only gets an inline data: URL#48190
#59833
Copy link
Assignees
kommander
Labels
2.0

Description

@luke9705
luke9705
opened on Sep 9, 2026
Issue body actions

Description

When an image file is pasted into the TUI composer (pasted path text, or a Finder file copy), the attachment is always submitted as an inline data: URL. The original path only survives in the part's source.path metadata, which the model never sees. After materialization the model effectively has an image and a temp path, so it cannot reference the source file it was given.

The server already does the right thing for file: URL attachments: in packages/opencode/src/session/prompt.ts it emits a synthetic text part with {"filePath": ...} alongside the image. The TUI paste flow just never produces file: URLs, so that path is unreachable.

Secondary symptom on macOS: pasting with the internal paste command (prompt.paste) with a Finder file copy on the clipboard attaches the file's generic icon bitmap, because clipboard.read() requests the clipboard as "PNGf" and the icon flavors win over the file URL/text flavors.

Steps to reproduce

  1. Copy an image file in Finder
  2. Paste it into the TUI composer (it is auto-attached as [Image 1])
  3. Submit and ask the model for the path of the attached image
  4. The model has no path: the part is a data: URL, materialized to a temp file

OpenCode version

v0.0.0-beta-19381 (also present on dev)

Operating System

macOS

Activity

  1. github-actions
    assigned
    kommander
    on Sep 9, 2026
  2. github-actions commented on Sep 9, 2026

    @github-actions
    github-actionsBot
    on Sep 9, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • tui: attached image path is omitted from model context #41454: Nearly identical — image attachment path omitted from model context in the TUI (V2 build)
    • macOS: image paste fails for Figma "Copy as PNG" clipboard contents #44740: Overlapping secondary symptom — macOS clipboard coercion picks up icon/wrong flavor instead of the image when pasting from certain apps
  3. opencode-agent
    added
    2.0
    on Sep 9, 2026
  4. rekram1-node
    closed this as completedin #59833on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kommander
    kommander

Labels

2.0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.