Skip to content

Windows: session list directory filter is case-sensitive, so a project's sessions disappear #53729

Closed as duplicate

Description

@Martin-soaring-dev

Description

On Windows, GET /api/session filters by directory case-sensitively. Windows paths are case-insensitive, so the same folder spelled with a different drive-letter case returns a different set, and one folder is split into two project rows. When the desktop sidebar's worktree path case differs from the stored session.directory case, the project's conversation list renders empty even though the sessions exist.

Related but distinct: #30374 (closed) fixed separator differences (E:\ vs E:/). This report is about case differences (E:/ vs e:/), which still reproduce on 2.0.24.

Measured on one install (same server, read-only queries):

directory query sessions returned
e:/…/citavi6_language_add-on_ZH 37
E:/…/citavi6_language_add-on_ZH 33
e:/…/MediaMetadataHub 1
E:/…/MediaMetadataHub 0
e:/…/默认项目 14
E:/…/默认项目 0

Expected: on a case-insensitive filesystem the filter should match case-insensitively (or the server should normalize the drive letter), so one real folder maps to one project and its sessions stay visible regardless of the case the client uses.

Actual: byte-exact match — the other case returns {"data":[]}, and the same folder is split across two project rows.

This recurs: after normalizing every existing row to lowercase via PATCH /api/project/{id} (canonical) and POST /api/session/{id}/move (directory), sessions created later through the uppercase path were written as E:/… again, re-splitting the project.

Plugins

None (only MCP servers configured)

OpenCode version

2.0.24 (desktop app; bundled CLI 2.0.24)

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 10.0.26300 (win32 x64)

Terminal

OpenCode Desktop 2.0.24 (also reproduced from cmd.exe / PowerShell 7)

Activity

  1. opencode-agent commented on Oct 7, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed measurements! This looks like the same problem as #49556: on Windows, the directory filter in GET /api/session matches the path exactly, including case, so the same folder spelled E:/… vs e:/… returns a different set of sessions. A fix is proposed in #49557. The project-splitting part you describe (one folder becoming two project rows, and new sessions being written again under the other case) is tracked in #52501, which has more Windows reports on 2.0.x. Please follow and add your data there.

    The bot will close this issue as a duplicate in 1 day. If your problem is different from those two, reply here and explain how, and it will stay open.

  2. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

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

    • #49556: Session listing misses sessions when the queried Windows directory differs only by case.
    • #44538: Sessions disappear because directory matching is case-sensitive and stored Windows paths use inconsistent casing.
  3. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as a duplicate of #49556. That issue covers the same problem: on Windows, GET /api/session matches directory letter for letter, so E:/… and e:/… return different sessions. A fix is proposed in #49557. For the other part of this report, where one folder splits into two project rows and new sessions are stored again under the other case, please follow #52501. Your measurements would be useful there.

    Thanks for the detailed report! If your case turns out to be different from those issues, comment here and we can reopen it.

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