Skip to content

[FEATURE]: Allow projects and their sessions to be removed from OpenCode #37280

Closed as duplicate

Description

@colabx69

Feature hasn't been suggested before.

  • 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.

Activity

  1. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

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

  2. PrParadoxy commented on Aug 23, 2026

    @PrParadoxy

    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.

  3. medfa12 commented on Oct 15, 2026

    @medfa12

    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.
    • Desktop and TUI: "Remove project…" action. If sessions are running, a first dialog says they will be stopped. The confirmation dialog then requires typing the project name. Desktop also clears the entry from recently closed (project: no API or UI to remove projects and recently-closed project entries #51197).
    • "Remove but keep sessions" stays as the existing Close.

    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?

  4. opencodejr commented on Oct 28, 2026

    @opencodejr

    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.

  5. opencodejr commented on Oct 29, 2026

    @opencodejr

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions