Skip to content

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

Description

@XXLxhPLMM

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

Activity

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