Problem
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.
Related