Skip to content

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

@bigguy345

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions