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 — mcp: binary file attachment in tool result permanently breaks the session · Issue #52448 · anomalyco/opencode

mcp: binary file attachment in tool result permanently breaks the session #52448

New issue
Copy link
New issue
Copy link
Closed
#57640
Closed
mcp: binary file attachment in tool result permanently breaks the session#52448
#57640
Copy link
Assignees
rekram1-node

Description

@janlavicka
janlavicka
opened on Oct 1, 2026
Issue body actions

Description

An MCP tool result with a type: "file" content item whose media type the provider can't inline (e.g. application/vnd.apache.parquet) is persisted into session history. The next model request fails:

AI.Error: OpenAI Chat does not support media type application/vnd.apache.parquet
  at OpenAIChat.lowerMedia
  at OpenAIChat.lowerToolMessages

Every later turn in that session fails the same way while replaying history — the session becomes permanently unusable, even for unrelated messages. Expected: unsupported file items dropped or converted to text at persistence time (byte materialization to a local file would be a bonus), or tolerated during lowering.

OpenCode version

2.0.21

Steps to reproduce

  1. Configure an MCP server whose tool returns a binary attachment (a file read returning { type: "file", mime: "application/vnd.apache.parquet", uri: "data:...;base64,..." } works).
  2. Call it in a session on an OpenAI Chat provider.
  3. Tool completes, then every request — including follow-ups about something else — fails with the error above.

Operating System

macOS 15.6 (Darwin 24.6.0, arm64)

Terminal

xterm-256color

Activity

  1. github-actions
    assigned
    rekram1-node
    on Oct 1, 2026
  2. github-actions commented on Oct 1, 2026

    @github-actions
    github-actionsBot
    on Oct 1, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • #30249: MCP tool results with non-image binary content crash the session.
    • #39824: Media in tool results can bypass model capability checks and permanently brick a session.
    • #48868: A PDF tool result causes replay failures and leaves an OpenAI-compatible-provider session stuck.
    • #37191: An MCP binary attachment persists in history and causes every subsequent Bedrock request to fail.
  3. vladislav-miroshnikov commented on Oct 1, 2026

    @vladislav-miroshnikov
    vladislav-miroshnikov
    on Oct 1, 2026
    Contributor
    More actions

    I reproduced this in v2's Chat request compiler with Parquet and CSV and opened #52517. The fix keeps the original files in history and sends Chat an omission note instead, so follow-ups can continue. The compiled Parquet and follow-up requests also completed against OpenAI. If you can try it with your MCP server, let me know how it goes.

  4. rekram1-node
    closed this as completedin #57640on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

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

    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.