anomalyco / anomalyco/opencode
tui: cannot remove stale projects from /open list; desktop crashes on non-existent project
@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:
- Open a project in TUI (
/openor startup) - Move or delete that project directory from disk
- Run
/openor/projectagain — the old project still appears in the list - There is no option to remove it from the list
Desktop:
- Open a project in the desktop app
- Move or delete that project directory from disk
- Go to Settings > Projects — the old project still appears
- Try to open it — the app crashes with
ClientError: UnexpectedStatus (status: 500)and must be restarted
Expected Behavior
- TUI:
/openand/projectshould 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
/openand/projectlists 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.