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
Compacted tool outputs and attachments not cleared from storage, causing memory growth #7421
When compaction prunes old tool outputs (in packages/opencode/src/session/compaction.ts), only the time.compacted timestamp is being set. The actual output string (often containing large file contents) and attachments array (base64 images/PDFs from the Read tool) remain in the storage JSON files indefinitely.
This causes storage files to grow unbounded, contributing to memory issues during extended use.
Expected Behavior
When prune() marks tool parts as compacted, it should also clear the output string and attachments array to free memory.
Actual Behavior
Only time.compacted is set; large output strings and attachment data persist indefinitely.
Activity
hendem commentedon Jan 9, 2026
Closing - will use existing issue #4315
github-actions commentedon Jan 9, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.