Skip to content

TUI session picker hides older root sessions when recent child sessions fill list #25897

Closed as not planned

Description

@jackmazac

Description

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

  1. Use a project with historical root sessions and many newer child/subagent sessions.
  2. Open the OpenCode TUI and open /sessions.
  3. Notice older root sessions are missing even though they exist in the session database and the session list API supports root filtering.

Screenshot and/or share link

N/A

Operating System

macOS 15.6

Terminal

Terminal.app / Cursor integrated terminal

Activity

  1. github-actions commented on May 5, 2026

    @github-actions
    Contributor

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

    Please review those issues and consider closing this one as a duplicate if the root cause matches.

  2. codeg-old commented on May 9, 2026

    @codeg-old

    I opened #26432 for this.

    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.

  3. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions