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
TUI autocomplete and session filter mishandle "/" worktree for non-git projects #29537
For non-git projects, the project worktree is intentionally set to "/"
(see packages/opencode/src/project/project.ts where worktree gets that
sentinel value when there's no VCS).
Two TUI sites don't account for this:
packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx
line 337: worktree: sync.path.worktree || sync.path.directory || process.cwd()
"/" is truthy so it's used directly, instead of falling back to the
project directory.
packages/opencode/src/cli/cmd/tui/context/sync.tsx
line 119: the guard !project.data.instance.path.worktree || ...
doesn't catch "/", so the session list filter computes path.relative("/", "/tmp/foo") = "tmp/foo" and sends that as a
path scope to the server instead of falling through to scope: "project".
Same root cause as PR #29180 (fix(tui): handle non-git project paths
when opening editor), which fixed three other call sites but missed
these two.
Plugins
No response
OpenCode version
1.15.11
Steps to reproduce
Run opencode in a directory that has no .git folder (mkdir /tmp/test && cd /tmp/test && opencode)
autocomplete: configure a local "reference" entry in opencode.json — when @-referencing, paths are resolved against "/" instead of the project directory
session filter: opencode session list query includes a path scope derived from "/" rather than the expected "project" scope
Activity
github-actions commentedon May 27, 2026
This issue might be a duplicate of existing issues. Please check:
If these cover the same underlying problem, it may be worth consolidating.
github-actions commentedon Oct 14, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.