Summary
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.
Environment
- opencode version:
opencode2 v0.0.0-next-15828
- OS: Darwin 25.4.0, arm64
- Terminal: tmux,
TERM=xterm-256color, COLORTERM=truecolor
- Shell:
/bin/zsh
- Install/channel: OpenCode 2 next/beta
- Active plugins:
opencode-anthropic-auth.mjs
Reproduction
- 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.
Workaround:
opencode2 --session <session-id>
Related:
Summary
In OpenCode 2 beta,
/sessionsomits resumable root sessions when recent child/subagentsessions fill the first session-list page. The sessions remain available through the API
and can be resumed directly with
opencode2 --session.Environment
opencode2 v0.0.0-next-15828TERM=xterm-256color,COLORTERM=truecolor/bin/zshopencode-anthropic-auth.mjsReproduction
/sessions.opencode2 api get '/api/session?order=desc&limit=100'opencode2 api get '/api/session?order=desc&limit=100&parentID=null'Expected Behavior
/sessionsrequests 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:
parentID=nullreturns 3 roots for the current directory.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.
Workaround:
Related:
parentIDfiltering before pagination