Skip to content

[Bug] Windows paths with different separators (backslash vs forward slash) treated as different directories in Web UI #12940

Closed

Description

@shiquda

Description

On Windows, the same directory is treated as different directories depending on the path separator used, causing conversations to not be shared/accessible between them.

Example

  • Actual Windows path: "E:\AA\BB"
  • When opened via Web UI search: "E:/AA/BB"

These two representations point to the same physical directory, but they are treated as separate directories in the Web UI. As a result:

  • Conversations started in one path format cannot be accessed when the directory is opened with the other format
  • This creates duplicate/inconsistent conversation history

Expected Behavior

Paths should be normalized (converting backslashes to forward slashes or vice versa) before being used as directory identifiers, so that and are recognized as the same directory.

Environment

  • OS: Windows
  • OpenCode version: (latest)
  • Web UI accessed via browser

Related Issues

Possibly related to #1374 (Windows path separator issues)

Steps to Reproduce

  1. On Windows, navigate to a project directory (e.g., )
  2. Open OpenCode Web UI
  3. Start a conversation
  4. Use Web UI search to open the same directory (which may show as )
  5. Observe that the previous conversation is not accessible

Additional Context

This is likely a path normalization issue where Windows backslash paths () are not being normalized to match forward slash paths () when used as directory identifiers in the Web UI session management.

Activity

  1. github-actions commented on Feb 10, 2026

    @github-actions
    Contributor

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

  2. EgilSandfeld commented on Feb 21, 2026

    @EgilSandfeld

    I can confirm this issue on Windows, and I have additional repro details (posted in #14570) that seem related:

    Additional findings

    1. Drive-letter case mismatch also breaks session visibility
      • /session?directory=b:/dev/DRE/dre4 returns sessions
      • /session?directory=B:/dev/DRE/dre4 can return 0
      • So this is not only slash mismatch (\ vs /), but also case-sensitive directory key matching.
    2. Duplicate workspace entry for the same worktree
      • feature/loc-turkish appears twice in sidebar.
      • One entry has sessions, the other is empty.
      • Looks like path variants such as C:/.../crisp-planet and C:\...\crisp-planet are treated as separate workspaces.
    3. Global project edge case
      • For non-git/global context (project_id=global, worktree /), /session?directory=b:/dev/Other/OpenCode-Playground returns rows, but sidebar can remain empty.

    Suggested fix

    Normalize Windows paths before using them as identifiers for:

    • project/workspace resolution
    • session filtering
    • workspace dedupe

    Normalization should include:

    • slash style (\ vs /)
    • drive-letter case (B: vs b:)
    • case-insensitive comparisons on Windows
  3. github-actions commented on Apr 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

webRelates to opencode on web / desktopwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions