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 session picker hides older root sessions when recent child sessions fill list #25897
The TUI session picker can hide older resumable root sessions in projects with many recent child/subagent sessions.
The TUI bootstrap query currently requests sessions with a 30-day start filter and does not pass roots: true. The dialog then filters roots client-side, so recent child sessions can consume the server-side result window before root filtering happens. The server session list API already supports roots=true, so the TUI can ask for root sessions directly.
Expected behavior: /sessions should list historical root sessions that can be resumed, even when recent child sessions exist.
Plugins
N/A
OpenCode version
Observed on current dev source.
Steps to reproduce
Use a project with historical root sessions and many newer child/subagent sessions.
Open the OpenCode TUI and open /sessions.
Notice older root sessions are missing even though they exist in the session database and the session list API supports root filtering.
This issue might be a duplicate of existing issues. Please check:
/sessions TUI only shows recent sessions, ignores historical ones #16270: Describes the exact same root cause — TUI bootstrap does not pass roots: true, causing child sessions to fill the server-side result window before client-side root filtering happens. Includes the same proposed fix (roots: true in the sdk.client.session.list() call).
It avoids the earlier broad-bootstrap side effect by leaving the shared sync.data.session list unchanged and querying root sessions only inside the session switch dialog. It also avoids the 30-day bootstrap window for the default dialog list, preserves the existing scope/path filter, and includes a focused unit test for the query shape.
Verified locally on the current dev base with:
bun test test/cli/tui/dialog-session-list.test.ts test/server/session-list.test.ts test/server/httpapi-sdk.test.ts --timeout 30000
bun run typecheck
bun run build
Authorship disclosure: prepared with AI assistance.
Activity
github-actions commentedon May 5, 2026
This issue might be a duplicate of existing issues. Please check:
roots: true, causing child sessions to fill the server-side result window before client-side root filtering happens. Includes the same proposed fix (roots: truein thesdk.client.session.list()call)./sessionspicker only shows recent sessions, older root sessions are missing./sessionsonly shows sessions from last 30 days due to child session dilution.Please review those issues and consider closing this one as a duplicate if the root cause matches.
codeg-old commentedon May 9, 2026
I opened #26432 for this.
It avoids the earlier broad-bootstrap side effect by leaving the shared
sync.data.sessionlist unchanged and querying root sessions only inside the session switch dialog. It also avoids the 30-day bootstrap window for the default dialog list, preserves the existing scope/path filter, and includes a focused unit test for the query shape.Verified locally on the current
devbase with:bun test test/cli/tui/dialog-session-list.test.ts test/server/session-list.test.ts test/server/httpapi-sdk.test.ts --timeout 30000bun run typecheckbun run buildAuthorship disclosure: prepared with AI assistance.
github-actions commentedon Jul 9, 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.