Skip to content

Bug: GUI sessions not visible for OneDrive (reparse point) directories #38780

Closed as not planned

Description

@EvenZ2001

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

  1. Create a directory under OneDrive: E:\OneDrive\academic\test
  2. Open this directory in the OpenCode GUI (File → Open Folder)
  3. Create a new conversation and send a message
  4. Observe: the conversation appears during the session
  5. Close and reopen the project
  6. The conversation does not appear in the project session list
  7. 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

Activity

  1. github-actions commented on Jul 25, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these, please add any relevant details that differentiate it.

  2. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions