anomalyco / anomalyco/opencode
session list and TUI mix sessions from unrelated non-git directories
@rekram1-node is already working on this.
Since Jul 23, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
opencode session list and the default TUI session filter can expose sessions from unrelated non-git directories. Non-git directories share the global project, while the CLI currently omits its directory and the TUI uses a recursive path filter.
Expected: default CLI and TUI listings use the exact launch directory. Explicit project/recursive browsing should keep its existing behavior. This issue only covers discovery; changing runtime cwd when resuming a session is separate.
Replaces #28972 and #18890, which were closed by inactivity while the current dev behavior remained unchanged.
Plugins
None
OpenCode version
Current dev (62e4641235)
Steps to reproduce
- Create sessions in two unrelated non-git directories.
- Run
opencode session listin one directory. - Open the TUI session picker there.
- Observe sessions from the other directory under the shared global project.
Screenshot and/or share link
N/A
Operating System
macOS
Terminal
iTerm2 / zsh
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.