anomalyco / anomalyco/opencode

tui: cannot remove stale projects from /open list; desktop crashes on non-existent project

Open
#49,442 4 comments 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Two related issues around handling non-existent project directories:

TUI — /open and /project commands show stale projects that can't be removed:

When a project directory is moved or deleted, the /open and /project commands still list it as a previously opened project. There is no way to remove stale entries. If the user selects one, the session fails or hangs.

Desktop — Settings > Projects shows non-existent projects, and opening them crashes the app:

In the desktop app, the Settings > Projects panel lists previously opened projects. If a project directory has been moved or deleted, it still appears in the list. When the user tries to open it, the app throws:

ClientError: UnexpectedStatus
    at i (oc://renderer/assets/health-BdaR9NAA.js:1:41042)

原因:
{
  status: 500
}

The desktop app becomes unresponsive and must be manually restarted.

Steps to reproduce

TUI:

  1. Open a project in TUI (/open or startup)
  2. Move or delete that project directory from disk
  3. Run /open or /project again — the old project still appears in the list
  4. There is no option to remove it from the list

Desktop:

  1. Open a project in the desktop app
  2. Move or delete that project directory from disk
  3. Go to Settings > Projects — the old project still appears
  4. Try to open it — the app crashes with ClientError: UnexpectedStatus (status: 500) and must be restarted
Expected Behavior
  • TUI: /open and /project should detect stale (non-existent) project entries and either remove them automatically or provide a way to delete them from the list
  • Desktop: Settings > Projects should detect stale entries and either remove them or show a clear error message ("Project directory not found") instead of crashing the app
Actual Behavior
  • TUI: Stale projects persist in /open and /project lists with no way to clean them up
  • Desktop: Settings > Projects shows stale entries; opening one crashes the app with a 500 error requiring a full restart
Additional Context
  • opencode version: 2.0.3
  • OS: Windows_NT 10.0.26200 (win32 x64)
  • Terminal: xterm-256color (TUI mode)
  • Shell: cmd.exe
  • Install/channel: npm global, latest
  • Active plugins: None
  • This is a common scenario when reorganizing project directories or migrating between machines

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.