Skip to content

fix: don't boot a full instance for session list#37477

Open
armancharan wants to merge 5 commits into
anomalyco:devfrom
armancharan:fix/session-list-bootstrap
Open

fix: don't boot a full instance for session list#37477
armancharan wants to merge 5 commits into
anomalyco:devfrom
armancharan:fix/session-list-bootstrap

Conversation

@armancharan

@armancharan armancharan commented Jul 17, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #37435

#37435

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

session list was loading a full instance just to query the db, which can take a long time. Skip that, resolve the project from cwd, and list by project id.

How did you verify your code works?

  • bun test test/cli/session-list-bootstrap.test.ts test/server/session-list.test.ts
  • session list does not run InstanceBootstrap plugins — plugins stay unloaded for session list (still run for agent list)
  • filters by projectID when projectID is provided — lists only this project's root sessions; excludes children and other projects

Acceptance

Claim Test
Skip InstanceBootstrap for session list session list does not run InstanceBootstrap plugins
Still project-scoped via projectID filters by projectID when projectID is provided

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Comment thread packages/opencode/src/cli/cmd/session.ts Outdated
armancharan and others added 3 commits July 17, 2026 21:30
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/opencode/test/server/session-list.test.ts Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode session list hangs for ~2 minutes due to unnecessary full InstanceBootstrap

1 participant