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
tui: attached image path is omitted from model context #41454
In OpenCode V2, an image attachment is shown in the TUI with its filename, but the model receives only an image placeholder/content and cannot see the attachment's path or original filename. This prevents the agent from referring to or operating on the attached image as a local file.
Environment
opencode version: Unavailable: screenshot does not show a version
OS: Unavailable: not provided
Terminal: Unavailable: not provided
Shell: Unavailable: not provided
Install/channel: OpenCode V2 build
Active plugins: Unavailable: not provided
Reproduction
Attach a local image to a prompt in the V2 TUI.
Observe that the attachment chip displays its filename (for example, IMG_3480.JPG).
Ask the agent whether it can see the image path or original filename.
Expected Behavior
The model context should include the attachment's path or original filename alongside the image content, allowing the agent to identify and reference the local file.
Actual Behavior
The agent can inspect the attached image as [Image 1], but reports that no filesystem path or original filename is exposed to it and that the image is not automatically available to scripts.
Additional Context
Reproduced in an OpenCode V2 build. The TUI visibly retains the filename, so the metadata appears to be dropped when constructing model input rather than during attachment ingestion.
I will work on this. I am tracing the V2 TUI local attachment metadata through the prompt request and will add a focused regression test before changing the model input conversion.
Activity
cakeni commentedon Aug 9, 2026
I will work on this. I am tracing the V2 TUI local attachment metadata through the prompt request and will add a focused regression test before changing the model input conversion.
cestercian commentedon Sep 17, 2026
Taking a look at including the attached image path/filename in the model context for V2 attachments.
fix(tui): paste local images as file:// attachments
fix(tui): embed pasted images and carry path in description