Skip to content

bug(tui): Switch Session can hide recent root sessions behind child sessions #23277

Closed

Description

@jiwangyihao

Problem

Switch Session fetches a mixed session list and only filters root sessions in the dialog.

When a project has many newer child sessions, recent root sessions can disappear from the default dialog even though opencode session list still shows them.

Repro

  1. Create a project with many recent child sessions / subagent sessions
  2. Keep an older-but-still-recent root session
  3. Open Switch Session
  4. Notice that the root session can be missing from the default list

Why this happens

The dialog path limits the mixed session list before filtering parentID === undefined, so child sessions can crowd root sessions out of the first page.

Related: #16270

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Apr 18, 2026
  2. github-actions commented on Apr 18, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No standard issue template was used. Bug reports must use the Bug Report template, which requires an environment/system information section (OS, OpenCode version, terminal, etc.) to help reproduce and diagnose the issue.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. jiwangyihao commented on Apr 18, 2026

    @jiwangyihao
    Author

    Closing as a duplicate of #16270. That existing issue already tracks the same root cause: the TUI session dialog requests a mixed root+child list, hits the default limit, and only filters root sessions client-side, so recent child sessions can crowd root sessions out of the default picker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions