opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Does OpenCode automatically clean up old session/conversation data?

Open junhoyeo opened this issue 1 month ago • 1 comments

Question

Just to confirm, OpenCode doesn't automatically clean up old session data in ~/.local/share/opencode/storage/, right? I want to make sure I'm not missing any cleanup logic that might delete historical data.

junhoyeo avatar Dec 02 '25 11:12 junhoyeo

This issue might be a duplicate of existing issues or closely related to ongoing discussions. Please check:

  • #4315: Memory stays unbounded: ACP session map + compacted tool outputs - discusses data retention and memory issues with session storage
  • #4317: Feature: generic /compact command, auto-compaction, and fork-aware conversations - addresses session data compaction and management
  • #3995: Single opencode session is consuming 23+GB of memory - related memory/storage bloat issue
  • #3274: Can I get an easily human readable log file with plain text that just shows the whole conversation? - related to understanding what data is stored in ~/.local/share/opencode

Feel free to ignore if your specific concern differs from these existing discussions.

github-actions[bot] avatar Dec 02 '25 11:12 github-actions[bot]

No it does not

Although i think there is currently a hardcoded limit for session retrieval (used to populate session picker)

We will of course add pagination but the hardcoded limit is there for now to address some perf issues

rekram1-node avatar Dec 02 '25 15:12 rekram1-node