Does OpenCode automatically clean up old session/conversation data? #3252

Open
opened 2026-02-16 17:39:20 -05:00 by yindo · 2 comments
Owner

Originally created by @junhoyeo on GitHub (Dec 2, 2025).

Originally assigned to: @rekram1-node on GitHub.

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.

Originally created by @junhoyeo on GitHub (Dec 2, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 2, 2025):

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] commented on GitHub (Dec 2, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Dec 2, 2025):

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 commented on GitHub (Dec 2, 2025): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3252