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
Non-Git sessions use "/" as working directory #47198
Using "/" as the working directory is at once surprising, dangerous, and causes LLMs to underperform (e.g. lower-powered models won't consider that / is special and just start scanning the entire filesystem for project-related files).
A prior bug report exists in #24694 but it was closed with no comment from the developers. Likewise a working PR was closed by a PR auto-cleanup bot, again with no comment from the developers. There appear to be many other bugs related to this design defect as well.
Plugins
Stock
OpenCode version
1.18.20
Steps to reproduce
Run opencode in a directory that is not inside a GIt repository and start working in a fresh session
Every PR and issue related to this issue has been closed in the past by a Github Action with 0 interaction from human maintainers. I understand this is a large project, but there may be too much automation going on in this project.
Activity
github-actions commentedon Sep 4, 2026
This issue might be a duplicate of existing issues. Please check:
/as worktree, breaking path resolution (closed, but appears unresolved)fs/listreturns HTTP 500 when started in a non-git directory, directly caused by worktree resolving to/If your issue is distinct from these, feel free to add more context clarifying the difference.
mattcoleanderson commentedon Sep 24, 2026
Every PR and issue related to this issue has been closed in the past by a Github Action with 0 interaction from human maintainers. I understand this is a large project, but there may be too much automation going on in this project.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊