Skip to content

OpenCode keeps reopening deleted project path after creating a new session #31401

Closed

Description

@fakheem7

Version:
OpenCode Desktop v1.16.2

Operating System:
Windows 11

Description:
OpenCode keeps reopening a deleted project path automatically.

Steps to reproduce:

Open a project.
Delete the project folder from disk.
Remove workspace files (opencode.workspace.*.dat).
Restart OpenCode Desktop.
Create a new session or open another project.

Expected behavior:
OpenCode should forget the deleted project and open the newly selected project.

Actual behavior:
OpenCode automatically returns to the old deleted project path and keeps reopening it in new sessions.

Additional information:

The original project folder no longer exists.
Workspace files were deleted.
The issue persists after restarting the application.
It appears that the project path is stored somewhere other than the workspace files.

Version:
OpenCode Desktop v1.16.2

Activity

  1. github-actions commented on Jun 8, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please add a "+1" or additional context to those existing issues rather than opening a new one.

  2. fakheem7 commented on Jun 8, 2026

    @fakheem7
    Author

    Closing this issue as a duplicate of #30697.

    I am experiencing the same behavior on Windows 11 with OpenCode Desktop v1.16.2 and have added my details there.

  3. liudongyan13701205717-source commented on Aug 8, 2026

    @liudongyan13701205717-source

    Another reproduction of the same bug family on the latest production build — Windows 11, Desktop 1.18.15:

    1. Deleted the project folder from disk (after quitting the app).
    2. Recreated a folder with the same name.
    3. The old sessions for that project reappeared in the new project's session list — session data is evidently keyed by project name/path, not by folder identity.

    This is the same symptom described in #41068 (which the bot flagged as a duplicate of this issue). Just adding the fresh 1.18.15 repro data here so it stays tracked on this issue. Happy to provide logs/screenshots if needed.

  4. liudongyan13701205717-source commented on Aug 15, 2026

    @liudongyan13701205717-source

    Cross-link with #41068 (cannot delete projects/sessions) — both show deleted project data isn't cleaned up and reappears. Same root cause likely. +1.

  5. Hona commented on Sep 2, 2026

    @Hona
    Member

    Fixed for opencode2 launch via #46713
    You can try the desktop beta here: https://github.com/anomalyco/opencode-beta

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