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
{{ message }}
Repository navigation
TUI /sessions only show sessions from last 30 days, while CLI session list shows all my sessions (thank god) #16733
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.
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.
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.
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.
Activity
github-actions commentedon Mar 9, 2026
This issue might be a duplicate of existing issues. Please check:
/sessionspicker only shows recent sessions, older sessions still accessible via DBstartfilter in TUI bootstrap combined with child session dilution causes root sessions to be hidden in the pickerBoth issues describe the same behavior you're experiencing. Consider adding your findings as comments there instead.
bobcodev commentedon Mar 29, 2026
Version 1.3+ the problem persists :(
fix(tui): use roots filter instead of time-based filter for session list
fix(tui): use roots filter instead of time-based filter for session list
jchuder commentedon 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:
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.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 commentedon 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 clearcan also be useful, so users will not need to delete sessions one by one.Thanks for looking into this.
EdgarSedov commentedon 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 commentedon 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 explicitload older/ search-all path. If a session is actually pruned or deleted, that should be a different state fromhidden by current filter.That avoids the false data-loss signal while still letting the TUI keep initial load bounded.
Generated with ax.
github-actions commentedon 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.