Skip to content

[FEATURE]: Make session list limit configurable (currently hardcoded to 100) #17389

Closed as not planned

Description

@bigguy345

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The session list limit is hardcoded to 100 in Session.list() (packages/opencode/src/session/index.ts: const limit = input?.limit ?? 100). Once you accumulate more than 100 main sessions, older ones silently disappear from the TUI and opencode session list. This makes it look like sessions were deleted when they're just past the cutoff.

What makes it worse: subagent sessions (with parent_id) are stored in the same table. In my project I have 735 total sessions but only 98 are main sessions — the rest are subagent. If the limit ever counted those mixed in, the effective visible window would be even smaller.

What I'd like:

  • A config key (e.g. session.listLimit) to control how many sessions are shown
  • Gating the list limit for main agent sessions only so it doesn't factor in subagent ones

Environment: Windows 11, OpenCode 1.2.25

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 13, 2026
  2. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

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

    Both issues describe the identical problem you've encountered, with #16270 including a detailed root cause analysis and proposed fix.

  3. ariane-emory commented on Mar 14, 2026

    @ariane-emory
    Contributor

    I have this if you want it: ariane-emory#177

    I have been using it for a couple of months and it will have been working perfectly for me.

  4. assigned and unassigned on Apr 26, 2026
  5. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 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