anomalyco / anomalyco/opencode

session list and TUI mix sessions from unrelated non-git directories

Open
#38,529 3 comments 0 reactions 1 assignee View on GitHub

@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
  1. Create sessions in two unrelated non-git directories.
  2. Run opencode session list in one directory.
  3. Open the TUI session picker there.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.