From 218aad87ee8992f47bd0d979498a602870d20b5a Mon Sep 17 00:00:00 2001 From: bobcodev <4elentano@gmail.com> Date: Mon, 30 Mar 2026 01:26:02 +0300 Subject: [PATCH] fix(tui): use roots filter instead of time-based filter for session list The bootstrap session list query used a hardcoded 30-day time filter, which combined with the default limit of 100 and no roots filter, caused most returned sessions to be child/subagent sessions. After UI filtering for root sessions only (parentID === undefined), users with heavy subagent usage saw very few sessions. Replace { start: 30days } with { roots: true } so the server returns only root sessions, making all 100 limit slots available for user-visible sessions regardless of date. Fixes #16733 --- packages/opencode/src/cli/cmd/tui/context/sync.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/context/sync.tsx b/packages/opencode/src/cli/cmd/tui/context/sync.tsx index 3b296a927aa4..0e546cdd1066 100644 --- a/packages/opencode/src/cli/cmd/tui/context/sync.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/sync.tsx @@ -357,9 +357,8 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({ async function bootstrap() { console.log("bootstrapping") - const start = Date.now() - 30 * 24 * 60 * 60 * 1000 const sessionListPromise = sdk.client.session - .list({ start: start }) + .list({ roots: true }) .then((x) => (x.data ?? []).toSorted((a, b) => a.id.localeCompare(b.id))) // blocking - include session.list when continuing a session