Skip to content

[BUG] Desktop does not show sessions for non-Git project directories on Windows, while CLI lists them correctly #29621

Closed as not planned

Description

@wbdb

Description

OpenCode Desktop does not show existing sessions for a non-Git project directory, even though the same sessions are visible through the OpenCode CLI.

This works correctly for a Git-backed project directory, but not for a plain folder without a .git repository.

Observed Behavior In OpenCode Desktop:

Project 1, a Git repository, shows its previous sessions correctly.
Project 2, a non-Git folder, shows only the “New Session” button and no previous sessions.

In the CLI:

opencode session list
Run from Project 2, the expected sessions are listed correctly.

Expected Behavior OpenCode Desktop should show the same sessions for Project 2 that are shown by the CLI when both are pointing at the same directory.

A non-Git directory should still have its sessions visible in Desktop.

Investigation The sessions are stored correctly and can be listed by the CLI.

For Project 1, which is a Git repository, the session is associated with a real project entry:

{
  "project_id": "<project-specific-id>",
  "worktree": "C:\\example\\project-1",
  "vcs": "git",
  "name": "project-1"
}

The session references that project:

{
  "project_id": "<project-specific-id>",
  "directory": "C:\\example\\project-1"
}

For Project 2, which is not a Git repository, the session is associated with the global project instead:

{
  "project_id": "global",
  "worktree": "/",
  "vcs": null,
  "name": null
}

The session still contains the correct directory/path:

{
  "project_id": "global",
  "directory": "C:\\example\\project-2",
  "path": "example/project-2"
}

This suggests that the CLI can list sessions for non-Git folders by using session.directory or session.path, while OpenCode Desktop may be filtering only by session.project_id.

Possible Cause For non-Git directories, OpenCode appears to store sessions under the special global project instead of creating a project-specific entry. OpenCode Desktop then seems to filter sessions by project ID only, so these sessions are not shown in the project view.

Plugins

No response

OpenCode version

1.15.11

Steps to reproduce

  1. Create or open a regular folder on Windows that is not a Git repository, e.g. C:\example\project-2.
  2. Start an OpenCode session in that folder.
  3. Confirm via CLI that the session exists: opencode session list
  4. Open the same folder in OpenCode Desktop.
  5. Observe that the previous sessions are not shown.
  6. Initialize Git in that folder or compare with another Git-backed project.
  7. Observe that sessions for Git-backed projects appear correctly in Desktop.

Screenshot and/or share link

Image

Operating System

Windows 11 Pro

Terminal

Windows Terminal

Activity

  1. changed the title [-]Desktop does not show sessions for non-Git project directories on Windows, while CLI lists them correctly[/-] [+][BUG] Desktop does not show sessions for non-Git project directories on Windows, while CLI lists them correctly[/+] on May 27, 2026
  2. github-actions commented on May 27, 2026

    @github-actions
    Contributor

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

  3. github-actions commented on Jul 27, 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