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
[FEATURE]: Make session list limit configurable (currently hardcoded to 100) #17389
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
Activity
github-actions commentedon Mar 13, 2026
This issue might be a duplicate of existing issues. Please check:
Session.list()hardcoded limit of 100, with subagent sessions filling the quota and hiding older root sessions from the TUI/sessionspicker/sessionspicker only shows recent sessions due to the same limit issueBoth issues describe the identical problem you've encountered, with #16270 including a detailed root cause analysis and proposed fix.
ariane-emory commentedon Mar 14, 2026
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.
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.