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
Renaming a project folder breaks new sessions (stale worktree) #53476
Renamed a git-backed project folder on disk. Opening OpenCode in the new folder still sends the old path as x-opencode-directory, new sessions resolve to the global project, and any prompt fails with FileSystem.realPath ENOENT for the old path. The project row keeps the dead worktree because Project.fromDirectory never updates it for non-global projects.
OpenCode version
1.18.33-win-deploy
Steps to reproduce
Open OpenCode in a git-backed project folder.
Rename the folder on disk.
Open OpenCode in the renamed folder and create a session.
Send a prompt. prompt_async fails with ENOENT pointing at the old folder. The project worktree in the database still shows the old path.
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.
Activity
github-actions commentedon Oct 6, 2026
This issue might be a duplicate of existing issues. Please check:
FileSystem.realPathENOENT error.FileSystem.realPathENOENT when the stored session directory points to a moved or deleted 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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊