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
sessions break when their folder is renamed outside opencode #56385
Renaming a project folder outside opencode orphans its sessions. They fail with LocationNotFoundError on update and there is no repair path in the product.
Environment
opencode version: 2.0.31 (service 2.0.30)
OS: Linux 7.2.10-200.fc44.x86_64 (linux x64)
Terminal: foot, /bin/bash
Install/channel: latest
Active plugins: none found in config
Reproduction
Create a session in /home/user/Documents/myproject.
Rename the folder in a file manager to /home/user/Documents/myproject-v2.
Try to continue or rename the session via the API.
Expected Behavior
opencode detects the folder moved and offers to re-point the session and project, or migrates the stored paths automatically.
Actual Behavior
Session updates fail with LocationNotFoundError. Recovery requires hand-editing opencode.db rows across session_v2, project, project_directory, and worktree tables. Stale project rows can also resurrect on restart from orphaned worktree entries.
Additional Context
Consistently reproducible. Worked around with a local skill that runs session.move after every rename, but this belongs in the product.
Thanks for the report! This looks like a duplicate of #56270, your issue from yesterday. It has the same title and text and is still open. That issue in turn points to #44256, the open request to detect when a project folder is renamed or moved and re-link its sessions and project to the new path.
Possible duplicates and related issues, ordered from most to least likely:
If you disagree with the duplicate decision on #56270, it's best to reply there, so the discussion stays in one place. If you can reproduce stale project rows coming back on restart from orphaned worktree entries, please open a separate issue with the steps for that.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Closing this as a duplicate of #56270, your earlier issue with the same title and text. We haven't had a reply in the day since the duplicate notice. That issue points to #44256, which asks for renamed or moved project folders to be detected and their sessions re-linked, so please follow #44256 for that request. If something here really is different, for example stale project rows coming back from orphaned worktree entries, please open a new issue with the steps to reproduce it. Thanks!
Activity
opencode-agent commentedon Oct 17, 2026
Thanks for the report! This looks like a duplicate of #56270, your issue from yesterday. It has the same title and text and is still open. That issue in turn points to #44256, the open request to detect when a project folder is renamed or moved and re-link its sessions and project to the new path.
Possible duplicates and related issues, ordered from most to least likely:
project.worktree; this may relate to the stale project rows you mentionIf you disagree with the duplicate decision on #56270, it's best to reply there, so the discussion stays in one place. If you can reproduce stale project rows coming back on restart from orphaned
worktreeentries, please open a separate issue with the steps for that.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 18, 2026
Closing this as a duplicate of #56270, your earlier issue with the same title and text. We haven't had a reply in the day since the duplicate notice. That issue points to #44256, which asks for renamed or moved project folders to be detected and their sessions re-linked, so please follow #44256 for that request. If something here really is different, for example stale project rows coming back from orphaned
worktreeentries, please open a new issue with the steps to reproduce it. Thanks!