Description
OpenCode Desktop’s local database grew to approximately 72 GB after roughly two weeks of use, consuming a significant portion of my Mac’s storage.
I investigated the database because macOS was suddenly running very low on disk space. The database breakdown was approximately:
- opencode.db: ~72.1 GB allocated
- Database payload: ~67.1 GiB
- event table: ~64.3 GiB
- message table: ~2.38 GiB
- part table: ~0.44 GiB
- event therefore accounted for roughly 95.8% of the measured database payload
The event data appeared to contain extremely large/repeated message and part update payloads, including message.updated.1 / message.part.updated.1 data.
I am a heavy OpenCode user, but ~72 GB of local database growth in around two weeks seems abnormal and effectively caused OpenCode to fill my disk.
There appears to be no effective retention/compaction mechanism preventing this data from growing indefinitely.
Ideally OpenCode should prune/compact redundant historical event data or provide a configurable retention/storage limit.
Possibly related to #33356.
Plugins
No response
OpenCode version
1.18.18
Steps to reproduce
- Use OpenCode Desktop heavily across multiple coding sessions/projects over an extended period.
- Allow normal agent activity, tool calls and long conversations to accumulate.
- Monitor the size of the local opencode.db.
- Inspect the SQLite database tables.
- Observe that the event table grows disproportionately and can consume tens of gigabytes without an apparent retention limit.
In my case, after roughly two weeks, opencode.db reached ~72.1 GB, with ~64.3 GiB attributable to the event table.
Screenshot and/or share link
No response
Operating System
macOS 26.5.1 (Apple Silicon)
Terminal
Terminal.app
Description
OpenCode Desktop’s local database grew to approximately 72 GB after roughly two weeks of use, consuming a significant portion of my Mac’s storage.
I investigated the database because macOS was suddenly running very low on disk space. The database breakdown was approximately:
The event data appeared to contain extremely large/repeated message and part update payloads, including message.updated.1 / message.part.updated.1 data.
I am a heavy OpenCode user, but ~72 GB of local database growth in around two weeks seems abnormal and effectively caused OpenCode to fill my disk.
There appears to be no effective retention/compaction mechanism preventing this data from growing indefinitely.
Ideally OpenCode should prune/compact redundant historical event data or provide a configurable retention/storage limit.
Possibly related to #33356.
Plugins
No response
OpenCode version
1.18.18
Steps to reproduce
In my case, after roughly two weeks, opencode.db reached ~72.1 GB, with ~64.3 GiB attributable to the event table.
Screenshot and/or share link
No response
Operating System
macOS 26.5.1 (Apple Silicon)
Terminal
Terminal.app