Repository navigation
Description
Planned GitHub issue submission
Title
Instant compaction on first github-copilot/gpt-5.4 prompt with 3 screenshots
Body
Description
Fresh desktop session, first real prompt, github-copilot/gpt-5.4, 1 text part + 3 PNG screenshots.
OpenCode immediately inserted a compaction overflow event and compacted the session instead of handling the multimodal request normally.
This looks like an oversized request assembly problem, not normal long-session compaction.
Plugins
~/.config/opencode/plugins/stall-watch.js
OpenCode version
1.3.5
Possible regression window: 1.3.4 included Refactor session compaction service to use Effect.
Steps to reproduce
- Open a new desktop session.
- Select
github-copilot/gpt-5.4. - Submit the first prompt with:
- 1 text part
- 3 PNG screenshots
- Observe immediate compaction.
Screenshot and/or share link
I am not including the original screenshots or prompt text here because they were real working-context attachments.
Here is the exact metadata/evidence from the local OpenCode DB for the repro session:
- Session ID:
ses_2c62311e5ffeWeo5Gd4IDrPmST - Session title:
New session - 2026-03-29T13:51:13.434Z - First prompt text length:
430characters - Image count:
3 - Total serialized image payload in
part.data:6,445,024bytes - Individual serialized image-part sizes:
2641252bytes1908532bytes1895240bytes
The image parts were stored as inline base64 data:image/png;base64,... payloads.
Immediately after the first user message, OpenCode inserted:
{"type":"compaction","auto":true,"overflow":true}It then inserted a synthetic follow-up saying:
The previous request exceeded the provider's size limit due to large media attachments. The conversation was compacted and media files were removed from context. If the user was asking about attached images or files, explain that the attachments were too large to process and suggest they try again with smaller or fewer files.
Why this seems like an OpenCode bug
- Global config only had:
"compaction": {
"auto": true,
"prune": true
}- No custom
compaction.reserved - No project-level OpenCode config in the target repo
- After compaction removed the attachments,
github-copilot/gpt-5.4continued to work normally in the same session
So this looks like OpenCode is building an oversized multimodal request, likely because pasted screenshots are serialized inline as large base64 data: payloads.
Expected behavior
Prefer any of these over instant session compaction:
- downscale/compress screenshots before request assembly
- keep attachments out of the main context budget until send time
- surface a direct "attachments too large" error without compacting the whole conversation
- preserve the original attachments and let the user retry with fewer/smaller files
Operating System
macOS arm64
Terminal
Desktop app repro
Activity
github-actions commentedon Mar 29, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.