anomalyco / anomalyco/opencode
Bug: GUI sessions not visible for OneDrive (reparse point) directories
@Hona is already working on this.
Since Jul 25, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When OpenCode project directories are located under OneDrive (e.g. E:\OneDrive\academic*), the GUI cannot display or organize sessions under those projects. Sessions ARE created and stored in the SQLite database (message, part tables), but they never appear in the GUI project view.
For comparison, D:\ drive (regular NTFS) projects work correctly — sessions are visible and manageable in the GUI.
Root Cause Analysis
OneDrive-managed directories are NTFS reparse points (tag 0x9000601a — Microsoft OneDrive Files On-Demand). This causes path resolution mismatches in the OpenCode backend.
Evidence:
OneDrive directory confirmed as reparse point:
text
fsutil reparsepoint query "E:\OneDrive\academic\test"
Reparse Tag Value: 0x9000601a
Tag value: Microsoft
Tag value: Directory
Sessions stored correctly but session_message projection is empty for ALL OneDrive sessions:
text
D-drive sessions: 131 sessions → 57 session_message entries
OneDrive sessions: 20 sessions → 0 session_message entries
realpathSync behavior comparison:
text
// Direct OneDrive path → returns OneDrive path (expected)
realpathSync("E:\OneDrive\academic\test")
→ "E:\OneDrive\academic\test"
// Directory junction → RESOLVES THROUGH to OneDrive (not useful)
mklink /J D:\link\test E:\OneDrive\academic\test
realpathSync("D:\link\test")
→ "E:\OneDrive\academic\test"
// subst drive letter → PRESERVES drive letter (correct in terminal)
subst X: E:\OneDrive\academic
realpathSync("X:\test")
→ "X:\test"
Even though subst X: prevents realpathSync resolution at the terminal level, the Electron GUI file picker (dialog.showOpenDialog) internally resolves subst paths back to physical paths before passing them to the backend. No filesystem-level workaround (junction, subst, symlink) is effective.
Database state for a OneDrive session (identical structure to working D-drive sessions):
text
session.directory = "E:/OneDrive/academic/test"
session.project_id = "global"
session.workspace_id = null
session.path = "E:/OneDrive/academic/test"
Plugins
No response
OpenCode version
1.18.5
Steps to reproduce
- Create a directory under OneDrive: E:\OneDrive\academic\test
- Open this directory in the OpenCode GUI (File → Open Folder)
- Create a new conversation and send a message
- Observe: the conversation appears during the session
- Close and reopen the project
- The conversation does not appear in the project session list
- Database shows session and messages ARE stored, but session_message has 0 entries
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.