You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: /sessions command no longer filters by current working directory #19532
The /sessions command (and session list in the TUI) no longer filters sessions by the current working directory/project path. Previously, sessions were scoped to the directory where they were created, so switching to a project directory would only show that project's sessions.
Current Behavior
/sessions shows all sessions for the current project regardless of the directory they were created in. This makes it difficult to find relevant sessions when working across multiple directories/projects.
Expected Behavior
/sessions should filter sessions by the current working directory, as it did previously. Sessions created in /path/to/projectA should only appear when OpenCode is launched from that directory.
Root Cause
In packages/opencode/src/cli/cmd/session.ts:93, the Session.list() call does not pass the directory parameter:
The Session.list() function supports a directory parameter for filtering, and sessions store a directory field in the database (SessionTable.directory), but the CLI/TUI command simply doesn't use it.
Suggested Fix
Pass the current working directory as the directory parameter when listing sessions:
Activity
github-actions commentedon Mar 28, 2026
This issue might be a duplicate of existing issues. Please check: