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
Prompt token count of exceeds the limit of 128000 #11624
I get this error when a model like claude is trying to read file attachments that are images (.png, jpeg), thus crashing with token count limit.
I'd be great to perform token count before the request is getting sent to the model. In case, it exceeds the images shall be compressed to a reasonable size.
Plugins
No response
OpenCode version
1.1.48
Steps to reproduce
Let the model download an image (for e.g. via MPC), or python script ivocation, or curl
Thanks for the tip. 1.1.31 works with images. Especially handy when agent uses MCP like playwright to troubleshoot some bug and tries to take a screenshot.
Activity
github-actions commentedon Feb 1, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
DanielProkhorov17 commentedon Feb 1, 2026
#11450 This issue is reported during compaction. The usecase I'm describing is specifically related to image attachments.
bankjaneo commentedon Feb 1, 2026
The last good version that can read image is 1.1.31
You might want to pin to that version until this bug is fixed.
tlaukkanen commentedon Feb 2, 2026
Thanks for the tip. 1.1.31 works with images. Especially handy when agent uses MCP like playwright to troubleshoot some bug and tries to take a screenshot.
thomashfr commentedon Feb 2, 2026
I'm getting the same error when using the Figma prototype, or any more detailed prompt in plan mode. Version 1.1.48
paq85 commentedon Feb 3, 2026
Happens also with local model, when it tries to analyse image
aeciolevy commentedon Feb 5, 2026
Lifesaver.
I could not do anything with images anymore.
bankjaneo commentedon Feb 6, 2026
This bug has been fixed in 1.1.52 🎉