You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Allow projects and their sessions to be removed from OpenCode #37280
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
There should be an option to remove a project from OpenCode when it is no longer needed.
This action should remove the project from OpenCode's project list without deleting or modifying the underlying local project directory or files.
The user should also be given a clear choice regarding the project's associated session history.
Suggested behavior
A confirmation dialog could provide separate options to:
Remove the project from OpenCode.
Remove the project and its stored sessions from OpenCode.
Keep the local project folder and all of its files unchanged.
Deleting local project files should not be part of this action unless it is presented as a completely separate and explicit operation.
Reacted by Robert Wierzbicki, Davood Haji Taghi Tehrani, Yann Salmon, Luca Barbato, tooyangtoonaive and Miles Buckton
Honestly, this is such a basic feature that I am surprised that it doesn't exist. Is there a technical problem with creating project specific databases (like .opencode inside the project itself) which can easily be removed? Or perhaps it is better to ask, why the current implementation is the way it is? What advantages does it bring?
Edit: seems like in the latest update, one can close projects.
I'd like to work on this for V2. Proposed approach:
Add DELETE /api/project/:projectID. It stops running sessions, removes every session through Session.remove, removes worktrees OpenCode created (discovered ones are left on disk), then deletes the project row. It publishes a deleted event so other clients (desktop, TUI) drop the project. Project files on disk are never touched, and it works when the folder no longer exists.
Thanks for the clear write-up! I think this is a duplicate of #51197, which is where removing projects from OpenCode is being tracked. Other reports, including requests to also remove a project's sessions, have been merged into it.
Possible duplicates and related issues, ordered by likelihood:
We didn't hear back, so I'm closing this as a duplicate of #51197. That's where removing projects from OpenCode is being tracked, including the option to remove a project's sessions as well. PR #59580 is open against it and proposes both actions behind a confirm dialog. Please follow #51197 for updates. If your request is different from it, reply here and we can reopen this.
Activity
github-actions commentedon Jul 16, 2026
This issue might be a duplicate of existing issues. Please check:
PrParadoxy commentedon Aug 23, 2026
Honestly, this is such a basic feature that I am surprised that it doesn't exist. Is there a technical problem with creating project specific databases (like .opencode inside the project itself) which can easily be removed? Or perhaps it is better to ask, why the current implementation is the way it is? What advantages does it bring?
Edit: seems like in the latest update, one can close projects.
medfa12 commentedon Oct 15, 2026
I'd like to work on this for V2. Proposed approach:
DELETE /api/project/:projectID. It stops running sessions, removes every session throughSession.remove, removes worktrees OpenCode created (discovered ones are left on disk), then deletes the project row. It publishes a deleted event so other clients (desktop, TUI) drop the project. Project files on disk are never touched, and it works when the folder no longer exists.This is a V2 port of the idea in #52244, plus session and worktree cleanup. I'd split it into three PRs: core/API, desktop, TUI.
@Hona does this work for you, or is someone already on it?
opencodejr commentedon Oct 28, 2026
Thanks for the clear write-up! I think this is a duplicate of #51197, which is where removing projects from OpenCode is being tracked. Other reports, including requests to also remove a project's sessions, have been merged into it.
Possible duplicates and related issues, ordered by likelihood:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your request is different.
opencodejr commentedon Oct 29, 2026
We didn't hear back, so I'm closing this as a duplicate of #51197. That's where removing projects from OpenCode is being tracked, including the option to remove a project's sessions as well. PR #59580 is open against it and proposes both actions behind a confirm dialog. Please follow #51197 for updates. If your request is different from it, reply here and we can reopen this.