opencode
opencode copied to clipboard
Workaround for "UnknownError: No such file or directory" on Windows when open a git-enabled directories
Description
a persistent UnknownError when opening Git-enabled directories in the Windows desktop app.
The error persists through restarts, previously forcing users to perform a full reinstall or revert to the CLI.
The issue can be resolved by manually editing the configuration file:
Path: ~\AppData\Roaming\ai.opencode.desktop\default.dat
Steps:
- Locate the
"projects": {"local": [...]}section in the file. - The entries are sorted in reverse order; the first entry is typically the directory that triggered the error.
- Remove the problematic entry from the list and save the file.
Example:
- record: "server.v3": "{"list":[],"projects":{"local":[{"worktree":"Z:\\OpenCodePlayGround","expanded":true},{"worktree":"Z:\\Playground\\react","expanded":true},{"worktree":"Z:\\Playground","expanded":true}]}}",
- remove the first record
- screenshot:
This will allow the app to launch successfully without losing entire project history.
Plugins
No response
OpenCode version
1.1.3
Steps to reproduce
- opening Git-enabled directories in the Windows desktop app
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
No response