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
Reading a PDF file via the Read tool corrupts session when using Amazon Bedrock — unrecoverable error #26087
When the Read tool is used on a PDF (or other binary file), OpenCode stores
the binary content as a file-data tool result in the session history.
Amazon Bedrock's AI SDK does not support file-data content parts in tool
results, so every subsequent LLM call in the session fails immediately with
an unrecoverable error. The session cannot be resumed.
Plugins
No response
OpenCode version
OpenCode version: 1.14.39
Steps to reproduce
Use OpenCode with the Amazon Bedrock provider (model: eu.anthropic.claude-sonnet-4-6)
In a session, ask the AI to read a PDF file — e.g. "look at this file: path/to/file.pdf"
The AI calls the Read tool on the PDF; OpenCode reads it and stores the
binary content as a file-data part in the tool result
On the next LLM turn, OpenCode sends the full conversation history
(including the binary blob) to Bedrock
The session crashes and becomes permanently unrecoverable
Activity