opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Workaround for "UnknownError: No such file or directory" on Windows when open a git-enabled directories

Open Darkstarrd-dev opened this issue 1 week ago • 0 comments

Description

a persistent UnknownError when opening Git-enabled directories in the Windows desktop app.

Image

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:
Image

This will allow the app to launch successfully without losing entire project history.

Plugins

No response

OpenCode version

1.1.3

Steps to reproduce

  1. opening Git-enabled directories in the Windows desktop app

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Darkstarrd-dev avatar Jan 06 '26 13:01 Darkstarrd-dev