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 omits older roots when child sessions fill first page #37772
In OpenCode 2 beta, /sessions omits resumable root sessions when recent child/subagent
sessions fill the first session-list page. The sessions remain available through the API
and can be resumed directly with opencode2 --session.
Use a project containing older root sessions and many newer child/subagent sessions.
Start OpenCode 2 in that project.
Open /sessions.
Compare the picker with: opencode2 api get '/api/session?order=desc&limit=100'
Query roots server-side with: opencode2 api get '/api/session?order=desc&limit=100&parentID=null'
Expected Behavior
/sessions requests root sessions server-side and shows all matching resumable roots,
with pagination as needed.
Actual Behavior
The picker shows only two recent roots. In the same project:
The unfiltered 100-item page contains 2 roots and 98 children.
parentID=null returns 3 roots for the current directory.
The omitted root opens successfully using opencode2 --session <session-id>.
This suggests the TUI still fetches an unfiltered page and removes children client-side,
causing children to consume the page limit before root filtering.
Additional Context
The issue is consistently reproducible after restarting the computer, though restart
does not appear causal. Session persistence and service health are normal.
It looks like you've already referenced #25897 and #33931 in the issue — if those didn't fully resolve the problem for the V2/beta path, it may be worth confirming whether this is a regression or a new variant of the same issue.
Fixed in #37784 and merged into v2. The TUI data-store preload now requests parentID=null, so child sessions no longer consume the root-session page limit.
Activity
github-actions commentedon Jul 19, 2026
This issue might be a duplicate of existing issues. Please check:
It looks like you've already referenced #25897 and #33931 in the issue — if those didn't fully resolve the problem for the V2/beta path, it may be worth confirming whether this is a regression or a new variant of the same issue.
opencode-agent commentedon Jul 19, 2026
Fixed in #37784 and merged into
v2. The TUI data-store preload now requestsparentID=null, so child sessions no longer consume the root-session page limit.