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
File read tool fails on files containing curly braces {} when using Gemini model #7303
echo "This is a test file with empty curly brackets: {} > test.html.erb`
opencode
use this prompt: Read the file test.html.erb using your Read tool and show its contents here. If you don't succeed, then report that you didn't succeed. That's all. No other tool than the Read tool. No diagnostics.
It will fail and report "I didn't succeed."
Remove the curly brackets from the file, run the prompt again, and it will print the contents correctly.
changed the title [-]File read tool does not work with files containing empty curly brackets {}[/-][+]File read tool does not work with files containing curly braces {}[/+]on Jan 14, 2026
Thanks @rekram1-node! I checked different models and here is what I found on my machine:
Provider
Model
Read result
Error details
OpenRouter
Gemini 3 Flash Preview
❌
-
OpenRouter
Gemini 3 Pro Preview
❌
400 error "corrupted thought signature"
OpenRouter
Claude Sonnet 4.5
✅
-
OpenCode Zen
Big Pickle
✅
-
This seems to suggest an issue with OpenCode-Gemini compatibility? @rekram1-node could you try reproducing on your side with Gemini 3 Flash preview?
Details/screenshots below.
Details
As shown in the OP, if I switch the model to Gemini 3 flash preview using OpenRouter provider, start a new session, and submit the prompt, it fails:
If I switch the model to Gemini 3 pro preview using OpenRouter provider, start a new session, and submit the prompt, it fails with a 400 error "corrupted thought signature":
If I switch the model to Claude Sonnet 4.5 using OpenRouter provider, start a new session, and submit the prompt, it succeeds:
If I switch the model to big-pickle (OpenCode Zen provider), start a new session, and submit the prompt, it succeeds:
changed the title [-]File read tool does not work with files containing curly braces {}[/-][+]File read tool fails on files containing curly braces {} when using Gemini model[/+]on Jan 15, 2026
Activity
[-]File read tool does not work with files containing empty curly brackets {}[/-][+]File read tool does not work with files containing curly braces {}[/+]sedubois commentedon Jan 14, 2026
Issue persists with OpenCode 1.1.19.
It looks like the issue occurs whenever a code line contains both an opening { and a closing } curly brace, e.g.:
rekram1-node commentedon Jan 14, 2026
Cannot replicate
sedubois commentedon Jan 15, 2026
Thanks @rekram1-node! I checked different models and here is what I found on my machine:
This seems to suggest an issue with OpenCode-Gemini compatibility? @rekram1-node could you try reproducing on your side with Gemini 3 Flash preview?
Details/screenshots below.
Details
As shown in the OP, if I switch the model to Gemini 3 flash preview using OpenRouter provider, start a new session, and submit the prompt, it fails:
If I switch the model to Gemini 3 pro preview using OpenRouter provider, start a new session, and submit the prompt, it fails with a 400 error "corrupted thought signature":
If I switch the model to Claude Sonnet 4.5 using OpenRouter provider, start a new session, and submit the prompt, it succeeds:
If I switch the model to big-pickle (OpenCode Zen provider), start a new session, and submit the prompt, it succeeds:
[-]File read tool does not work with files containing curly braces {}[/-][+]File read tool fails on files containing curly braces {} when using Gemini model[/+]github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.