anomalyco / anomalyco/opencode
[FEATURE]: TUI session list limited to 100 sessions + only 30-day window — no way to see older sessions
@simonklee is already working on this.
Since Jul 22, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Problem
When scrolling through sessions in the TUI (<leader>l), only ~100 recent sessions are visible. Sessions older than 30 days or beyond the 100-session default are completely inaccessible from the TUI.
Root Causes
Two independent limits compound:
1. 30-day time window — sync.tsx line 363 filters sessions to only the last 30 days:
const start = Date.now() - 30 * 24 * 60 * 60 * 1000
const sessionListPromise = sdk.client.session
.list({ start: start })
Any session older than 30 days simply never appears in the TUI list, even if under 100 sessions total.
2. 100-session default limit — session.ts line 731:
const limit = input?.limit ?? 100
The sync passes no limit parameter, so the server caps at 100. No pagination or "load more" exists in the TUI DialogSelect component.
Real-world impact: A user with 262 sessions spanning 5+ months can only scroll through the most recent ~100 from the last 30 days. The rest exist in the database but are invisible from the TUI.
Proposed Solution
At minimum:
- Increase or remove the 30-day
startfilter in the sync — or make it configurable - Add pagination to the TUI session list (cursor-based, "load more" at scroll bottom, or virtual scrolling)
Stretch goals:
- Config option for
session_list_limitinopencode.json - Option to show all sessions (no time filter)
Related Issues
- #31513 — same hardcoded limit pattern but for messages within a session, not the session list itself
- #30109 — pagination broken when filtering by directory (related pagination issues)
Environment
- OpenCode: v1.14.19 (self-hosted binary)
- OS: Arch Linux
- Sessions in DB: 262 (700 MB)`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.