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
Thanks for the request! I think this is a duplicate of #16101, which asks for automatic retention and cleanup of old session data in opencode.db (time-based cleanup, auto-archiving, reclaiming space).
Possible duplicates and closely related issues, ordered from most to least likely:
If your request is different from #16101, please reply here and explain how. Otherwise the bot will close this issue as a duplicate in 1 day. Please add your 46 GB data point and your OpenCode version (opencode --version) to #16101 or #33356.
Thanks for the request! I think this is a duplicate of #16101, which asks for automatic retention and cleanup of old session data in opencode.db (time-based cleanup, auto-archiving, reclaiming space).
Possible duplicates and closely related issues, ordered from most to least likely:
* [[FEATURE]: Session Lifecycle Management — unified storage reclamation, auto-archival, and child session cleanup #16101](https://github.com/anomalyco/opencode/issues/16101): feature request for session lifecycle management: a time limit on stored data, auto-archiving and storage reclamation. This is the same as what you're asking for.
* [Unbounded growth of the `event` table: opencode.db reaches 13GB+, mostly `message.updated.1` snapshots (no retention/compaction) #33356](https://github.com/anomalyco/opencode/issues/33356): `opencode.db` grows without limit (13 GB and more) because the `event` table is never cleaned up. One commenter reports about 50 GB after a few months, so this is likely why your database got so large.
* [feat(cli): add session prune command to v2 #51255](https://github.com/anomalyco/opencode/pull/51255): an open pull request that adds an `opencode session prune <duration>` command to delete sessions older than a given age.
* [[FEATURE]: V2 offline SQLite inspection, verified backups and vacuum #54618](https://github.com/anomalyco/opencode/issues/54618): request for v2 tools to inspect, back up and vacuum the database.
* [v2: define snapshot retention and disk GC policy #36093](https://github.com/anomalyco/opencode/issues/36093): retention and cleanup for the file snapshot store, which also takes up disk space.
If your request is different from #16101, please reply here and explain how. Otherwise the bot will close this issue as a duplicate in 1 day. Please add your 46 GB data point and your OpenCode version (opencode --version) to #16101 or #33356.
its not a session issue its the installed opencode db it self
Thanks for clarifying! You're right, this is about the opencode.db file itself. That file holds your OpenCode data: projects, sessions, messages and an internal event log. In the large databases measured in #33356, over 90% of the file was that event log. It stores a full copy of a message on every update and is never trimmed. That issue is about exactly the database file growing to many GB, and one commenter there reports about 50 GB after a few months, like yours.
So it still looks like a duplicate, now with #33356 as the closest match. Ordered by likelihood:
If you can, please add your OpenCode version (opencode --version) and the full path and size of the 46 GB file to #33356. If the large file turns out not to be opencode.db, for example something under the snapshot/ folder, reply here and I'll look again. Otherwise the bot will close this issue as a duplicate on 2026-10-15.
Thanks for clarifying! You're right, this is about the opencode.db file itself. That file holds your OpenCode data: projects, sessions, messages and an internal event log. In the large databases measured in #33356, over 90% of the file was that event log. It stores a full copy of a message on every update and is never trimmed. That issue is about exactly the database file growing to many GB, and one commenter there reports about 50 GB after a few months, like yours.
So it still looks like a duplicate, now with #33356 as the closest match. Ordered by likelihood:
* [Unbounded growth of the `event` table: opencode.db reaches 13GB+, mostly `message.updated.1` snapshots (no retention/compaction) #33356](https://github.com/anomalyco/opencode/issues/33356): `opencode.db` grows without limit because the `event` table is never cleaned up. This is the same database file.
* [[FEATURE]: Session Lifecycle Management — unified storage reclamation, auto-archival, and child session cleanup #16101](https://github.com/anomalyco/opencode/issues/16101): request for automatic retention and cleanup of old data in `opencode.db`.
* [[FEATURE]: V2 offline SQLite inspection, verified backups and vacuum #54618](https://github.com/anomalyco/opencode/issues/54618): request for tools to inspect, back up and vacuum the database.
* [v2: define snapshot retention and disk GC policy #36093](https://github.com/anomalyco/opencode/issues/36093): retention for the separate `snapshot/` folder, in case that's where the space actually goes.
If you can, please add your OpenCode version (opencode --version) and the full path and size of the 46 GB file to #33356. If the large file turns out not to be opencode.db, for example something under the snapshot/ folder, reply here and I'll look again. Otherwise the bot will close this issue as a duplicate on 2026-10-15.
Thanks for confirming! The latest version (currently v2.0.29) still has no automatic cleanup for opencode.db: nothing removes old data from the event log or shrinks the file. So this is still the problem tracked in #33356, with #16101 asking for the automatic cleanup you describe. Adding a 👍 and your 46 GB data point there will help maintainers see how common this is.
This issue will still be closed as a duplicate of #33356 on 2026-10-15. If the 46 GB turns out to be something other than opencode.db (for example the snapshot/ folder next to it), reply here before then.
Closing this as a duplicate of #33356, which tracks opencode.db growing without limit because its event log is never trimmed. The request for automatic cleanup of old data is tracked in #16101. Please follow those two issues, and adding your 46 GB data point and version there would help. Thanks for the report! If the large file turns out to be something other than opencode.db, reply here and we can take another look.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the request! I think this is a duplicate of #16101, which asks for automatic retention and cleanup of old session data in
opencode.db(time-based cleanup, auto-archiving, reclaiming space).Possible duplicates and closely related issues, ordered from most to least likely:
eventtable: opencode.db reaches 13GB+, mostlymessage.updated.1snapshots (no retention/compaction) #33356:opencode.dbgrows without limit (13 GB and more) because theeventtable is never cleaned up. One commenter reports about 50 GB after a few months, so this is likely why your database got so large.opencode session prune <duration>command to delete sessions older than a given age.If your request is different from #16101, please reply here and explain how. Otherwise the bot will close this issue as a duplicate in 1 day. Please add your 46 GB data point and your OpenCode version (
opencode --version) to #16101 or #33356.s-b-repo commentedon Oct 14, 2026
its not a session issue its the installed opencode db it self
opencode-agent commentedon Oct 14, 2026
Thanks for clarifying! You're right, this is about the
opencode.dbfile itself. That file holds your OpenCode data: projects, sessions, messages and an internaleventlog. In the large databases measured in #33356, over 90% of the file was thateventlog. It stores a full copy of a message on every update and is never trimmed. That issue is about exactly the database file growing to many GB, and one commenter there reports about 50 GB after a few months, like yours.So it still looks like a duplicate, now with #33356 as the closest match. Ordered by likelihood:
eventtable: opencode.db reaches 13GB+, mostlymessage.updated.1snapshots (no retention/compaction) #33356:opencode.dbgrows without limit because theeventtable is never cleaned up. This is the same database file.opencode.db.snapshot/folder, in case that's where the space actually goes.If you can, please add your OpenCode version (
opencode --version) and the full path and size of the 46 GB file to #33356. If the large file turns out not to beopencode.db, for example something under thesnapshot/folder, reply here and I'll look again. Otherwise the bot will close this issue as a duplicate on 2026-10-15.s-b-repo commentedon Oct 14, 2026
im on the latest version
opencode-agent commentedon Oct 14, 2026
Thanks for confirming! The latest version (currently v2.0.29) still has no automatic cleanup for
opencode.db: nothing removes old data from theeventlog or shrinks the file. So this is still the problem tracked in #33356, with #16101 asking for the automatic cleanup you describe. Adding a 👍 and your 46 GB data point there will help maintainers see how common this is.This issue will still be closed as a duplicate of #33356 on 2026-10-15. If the 46 GB turns out to be something other than
opencode.db(for example thesnapshot/folder next to it), reply here before then.opencode-agent commentedon Oct 15, 2026
Closing this as a duplicate of #33356, which tracks
opencode.dbgrowing without limit because itseventlog is never trimmed. The request for automatic cleanup of old data is tracked in #16101. Please follow those two issues, and adding your 46 GB data point and version there would help. Thanks for the report! If the large file turns out to be something other thanopencode.db, reply here and we can take another look.