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 — fix(ai): prevent unsupported tool files from breaking Chat sessions by vladislav-miroshnikov · Pull Request #52517 · anomalyco/opencode

Conversation

@vladislav-miroshnikov

@vladislav-miroshnikov vladislav-miroshnikov commented Oct 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Follow-up to #52448

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

An unsupported file returned by a tool could make every later OpenAI Chat request fail when replaying the history.

The adapter now sends an omission note with the filename and MIME type. The file stays in the stored history. Tool text, images, PDFs, videos and user-media validation keep their existing handling.

#57640 filters new unsupported MCP attachments, but leaves existing history alone. Plugins can still return these files, so the replay fix is still needed.

How did you verify your code works?

Local checks on d0732ea:

  • Three regressions fail before the fix and pass afterward: Parquet, unnamed CSV and mixed PNG/PDF/CSV results.
  • Chat tests: 81 passed. Full AI suite: 1,814 passed, 28 skipped.
  • AI typechecks, root check and Effect checks pass.

The reporter's MCP server and new live-provider calls were not run.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added the needs:issue label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vladislav-miroshnikov vladislav-miroshnikov mentioned this pull request Oct 1, 2026
mcp: binary file attachment in tool result permanently breaks the session #52448
Closed
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vladislav-miroshnikov vladislav-miroshnikov changed the title fix(ai): tolerate unsupported files in Chat tool results fix(ai): prevent unsupported tool files from breaking Chat sessions Oct 1, 2026
@vladislav-miroshnikov

vladislav-miroshnikov commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

hey @rekram1-node, I reproduced #52448 in the Chat request compiler with Parquet and CSV tool results. When an unsupported file is in chat history, every follow-up fails before reaching the API. This fix keeps the attachment in history and sends Chat an omission note instead, so the session can continue.

I also checked the compiled Parquet request and a follow-up against openai api platform with gpt-5.4 and gpt-6.1-sol, both models handled them successfully.

Could you take a look at this for v2, please?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:26
@github-actions github-actions Bot removed the needs:issue label Oct 10, 2026
@opencode-agent opencode-agent Bot mentioned this pull request Oct 12, 2026
a tool result with a file type other than image or PDF makes every later request in the session fail #54798
Closed
@vladislav-miroshnikov
vladislav-miroshnikov force-pushed the mcp-binary-replay branch from 72cbdd3 to 511983b Compare October 16, 2026 10:35
@vladislav-miroshnikov

vladislav-miroshnikov commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Added replay coverage for Parquet, unnamed CSV and mixed PNG/PDF/CSV results. Unsupported Chat tool files now produce an omission note while preserving the stored history.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vladislav-miroshnikov
fix(ai): prevent unsupported tool files from breaking Chat sessions
649a3c9
@vladislav-miroshnikov
vladislav-miroshnikov force-pushed the mcp-binary-replay branch from 511983b to 649a3c9 Compare October 26, 2026 10:20
@vladislav-miroshnikov vladislav-miroshnikov mentioned this pull request Oct 26, 2026
fix(ai): flatten namespaced choices for flat protocols #52091
Open
3 of 6 tasks
@angelnu angelnu mentioned this pull request Oct 27, 2026
[BUG] a tool result with a binary part (application/octet-stream) still breaks every later request in the session #59644
Open
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Nov 1, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@vladislav-miroshnikov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.