Before submitting#
Area#
Not sure
Summary#
Pasting an unsupported document into a T3 Code chat produces a media-type error and leaves the conversation unusable. There is no apparent way to recover and continue the same chat.
Steps to reproduce#
Reported sequence:
- Open a chat in T3 Code.
- Paste a document that is not supported. In this case, the error identifies the file part as
text/html.
- Try to continue the conversation after the error appears.
The original document and a clean minimal reproduction are not available in this report.
Expected behavior#
Reject unsupported attachments with an actionable error before they leave the conversation in a failed state. If an attachment fails after submission, provide a way to remove or discard it and continue the existing chat.
Actual behavior#
The chat shows:
'file part media type text/html' functionality not supported.
After this error, the user cannot recover and continue the same conversation. The problem is the loss of a usable chat after an unsupported attachment is accepted.
Impact#
Blocks work completely in the affected chat.
Version or commit#
Not provided. Observed on September 16, 2026.
Environment#
The affected provider/model and exact app version have not been confirmed.
Screenshots, recordings, or supporting files#
The reporter supplied a screenshot showing the error above in red. The error is transcribed verbatim here.
Workaround#
No recovery workaround was reported.
Related issues#
- #11295 reports a similar unrecoverable-session outcome after browser screenshot tool results are stored in provider history. This report concerns a pasted document rejected as
text/html; a shared root cause has not been established.
- #7225 covered unsupported HEIC attachments failing a turn and was closed after attach-time validation was added.
Triage#
Confirmed in source. The quoted error is not a T3 string — it is Vercel AI SDK’s OpenAI-compatible converter (
'file part media type ${mediaType}' functionality not supported). T3 reaches that path only through OpenCode.Composer correctly treats a pasted
.html/text/htmldocument as a generic file (the image denylist from #6574 / #7225 does not apply).ProviderServicealready puts a filesystem path in the prompt. OpenCode then also sends the file as a native part becauseisOpenCodeNativeFilePartallows everytext/*type:apps/server/src/provider/opencodeRuntime.ts(toOpenCodeFileParts)apps/server/src/provider/Layers/OpenCodeAdapter.ts(session.promptAsyncparts)That allowlist already excludes ZIP, BMP, SVG, and oversized PDFs so the model call does not fail before it starts.
text/htmlwas left on the native path. Many OpenCode model converters (especially OpenAI-compatible) reject it. Once the file part is stored in the OpenCode session, later prompts replay it and the same error returns — including on text-only follow-ups.Claude, Cursor, Grok, and Codex never send generic files as native parts. Antigravity embeds
text/*as text. So this is OpenCode-specific.This is the same provider-history brick as #11295 (inline
preview_snapshotPNGs), with a different trigger. Not a duplicate. #7225 / #6574 only gate unsupported images at attach time.What prior work did not fix#
file, notunsupported-imagetext/*turn.startedso the UI does not wedge onworkingNo open T3 PR closes this.
Suggested fix#
In
isOpenCodeNativeFilePart:text/html(and likely othertext/*types the converter rejects) as native file parts. Use the path lineProviderServicealready prepends. Folded clipboard pastes (source: pasted-text) already skip native parts.application/pdf. That matches the comment intoOpenCodeFilePartsand the ZIP/BMP/SVG tests.A MIME change does not rewrite file parts already in an OpenCode session.
Workaround#
OpenCodeAdapter.rollbackThread→session.fork). If the failed turn never created an assistant boundary, rewind to the last good turn or just start a new chat.Implementable from current
main. Confirming the OpenCode model slug would be useful but is not required.Classification: bug · accepted · high (one paste can brick the OpenCode chat) Labels: add
bug,accepted,via-triageDiscord tags:providers,ui