GeezerVison is showing github.com — TUI /sessions only show sessions from last 30 days, while CLI session list shows all my sessions (thank god) · Issue #16733 · anomalyco/opencode
TUI /sessions only show sessions from last 30 days, while CLI session list shows all my sessions (thank god) #16733DescriptionDescription
What breaks:
The TUI /sessions picker only shows recent sessions and makes it look like older sessions are gone.
What still works:
opencode session list shows the full session history, and the CLI docs say session list should "List all OpenCode sessions."
Why this is concerning
The mismatch between TUI and CLI creates a false data-loss scare and blocks work.
Expected behavior:
- TUI
/sessions should show the same session history that the CLI can list.
- My entire session to stay unless I decide to prune them
Actual behavior:
TUI only shows recent sessions, while CLI can still see the old sessions
Official docs reference:
OPENCODE_DISABLE_PRUNE is documented as Disable pruning of old data, so users may assume old sessions are protected; the UI should not suggest they vanished when they still exist.
Related issue:
#13877: the existing report says the /sessions picker "only shows a small set of recent sessions."
Help me confirm the accuracy of this:
- Setting
OPENCODE_DISABLE_PRUNE=true for future protection of my sessions, because that is the only official deletion-related control I could verify
- Keep using
opencode session list plus opencode session resume <session_id> until the TUI bug is fixed, because the CLI docs explicitly support listing all sessions and resuming by session ID.
Related issues
Plugins
@ramarivera/opencode-model-announcer
OpenCode version
1.2.22
Steps to reproduce
- Update to 1.2.22
- Open TUI (
opencode)
- Write
/sessions
- Scroll all the way down only to see that sessions over 30 days are hidden
- Exit TUI
- Run
opencode list sessions and thank the gods that older sessions are still listed there
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
Windows Terminal Reacted by EdgarSedov, Ivan Vladyka, Diego V.S. and kennyliu Activityadded coreAnything pertaining to core functionality of the application (opencode server stuff) on Mar 9, 2026github-actions commented on Mar 9, 2026 This issue might be a duplicate of existing issues. Please check:
Both issues describe the same behavior you're experiencing. Consider adding your findings as comments there instead. bobcodev commented on Mar 29, 2026 Version 1.3+ the problem persists :( added 2 commits that reference this issue on Mar 29, 2026This issue will close once commit c31be25 is merged into the 'dev' branch.c31be25 This issue will close once commit 218aad8 is merged into the 'dev' branch.218aad8 jchuder commented on Apr 16, 2026 v1.4.6 same here.
Not sure whether the hardcoded 30 day cutoff was introduced as a defensive measure for memory/startup costs, especially given the memory discussion in #20695. But after looking at the current behavior, I think session discovery and session content loading should be separate to 2 problems.
My suggestion:
- The tui session list should not hide older sessions behind a hard 30 day cutoff. It should support pagination or infinite scroll more for older sessions instead. Search should be an accelerator, not the only way to discover sessions older than the current cutoff.(I tried to search some keywords to search over 30 day's old session missing in session list and the result is I can get old session in list as expected behavior.)
- The session list only needs lightweight metadata such as
id, title, updatedAt, and maybe workspace/status info. That is much cheaper than full message history, diffs, or snapshots...etc, so session discovery should be solved separately from heavy session hydration.
- Once a session is opened, large message histories should not be handled by loading the entire session into memory. A better approach would be:
- load the most recent chunk of messages first
- fetch older chunks when scrolling to the top
- So the long term fix here probably is not “remove the cutoff and load everything”, but rather:
- bounded initial loading for session list metadata
- pagination / infinite scroll for older sessions
- lazy chunk loading for opened session content
This seems aligned with the follow up direction discussed in #17046 and #13877 as well, where count-based limits and pagination / load more were already suggested as better UX than a hard time window. mr-yifeiwang commented on Apr 28, 2026 The problem still exists in v1.4.10.
The mismatch between sessions shown in the TUI and CLI is somewhat confusing. If the two interfaces are meant to reflect the same session state, it will make sense for them to stay consistent: when a session is deleted in the TUI, it shall no longer appear in opencode session list; and likewise a session deleted via CLI shall no longer appear in the TUI.
If the current mismatch is intentional, clearer documentation around that behaviour may help. In that case, a bulk cleanup command such as opencode session clear can also be useful, so users will not need to delete sessions one by one.
Thanks for looking into this. removed bugSomething isn't working coreAnything pertaining to core functionality of the application (opencode server stuff) on May 3, 2026EdgarSedov commented on May 30, 2026 Still affected by this. #26432 looks like the most focused active fix for the 30-day picker cutoff / hidden older sessions issue. Necmttn commented on Jun 21, 2026 The TUI should distinguish filtered from missing.
A low-risk fix is to show the active window (last 30 days), total indexed sessions if known, and an explicit load older / search-all path. If a session is actually pruned or deleted, that should be a different state from hidden by current filter.
That avoids the false data-loss signal while still letting the TUI keep initial load bounded.
Generated with ax. github-actions commented on Aug 21, 2026 To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|