Skip to content

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

Description

@samiralibabic

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions