#5443·paseo

OpenCode chat shows an uploaded file as raw text in the user bubble after a reload

Author: paseo-bot[bot]Created Sep 26, 2026Updated Sep 28, 2026
Labelsbugp3triagedneeds-maintainerdiagnosed

When an OpenCode chat is reloaded or reopened, a file uploaded with a prompt appears as raw text inside the user bubble, and the attachment chip is gone.

Steps (OpenCode 1.18.32, web app):

  1. Start an OpenCode agent, attach a text file (note.txt) in the composer, and send Read the attached file and reply with its contents.
  2. Live, the bubble shows a note.txt attachment chip above the typed text.
  3. Reload the page.

After the reload, the bubble shows this, with the typed text and the metadata joined without a line break:

Read the attached file and reply with its contents.Uploaded file: note.txt
Path: <the daemon's local upload path>
MIME: text/plain
Size: 27 bytes

Expected: the same bubble as before the reload, with the typed text and the chip.

The same result appears with and without #5434, which I was testing when I saw it. From the source, the OpenCode adapter sends an uploaded file as a plain text part (renderPromptAttachmentAsText in packages/server/src/server/agent/prompt-attachments.ts). On replay, buildOpenCodeReplayTimelineEvents in packages/server/src/server/agent/providers/opencode-agent.ts joins all of a user message's text parts with "", so it cannot tell the attachment apart from the typed text.