Skip to content

Commit c31be25

Browse files
committed
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 anomalyco#16733
1 parent e7f94f9 commit c31be25

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/opencode/src/cli/cmd/tui/context

‎packages/opencode/src/cli/cmd/tui/context/sync.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,8 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
357357

358358
async function bootstrap() {
359359
console.log("bootstrapping")
360-
const start = Date.now() - 30 * 24 * 60 * 60 * 1000
361360
const sessionListPromise = sdk.client.session
362-
.list({ start: start })
361+
.list({ roots: true })
363362
.then((x) => (x.data ?? []).toSorted((a, b) => a.id.localeCompare(b.id)))
364363

365364
// blocking - include session.list when continuing a session

0 commit comments

Comments
 (0)