opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(storage): add retry logic for UV_UNKNOWN errors on Windows

Open LizardLiang opened this issue 1 week ago • 1 comments

Problem

On Windows, storage operations can fail with UV_UNKNOWN errors due to transient file locking from anti-virus software (e.g., FortiClient) or other processes accessing the files.

Solution

Added retry logic (up to 3 retries with incremental delays) before giving up, which allows time for anti-virus or other processes to release the file lock.

Change

  • Adds retry logic for transient file system errors on Windows
  • Handles UV_UNKNOWN, EBUSY, EPERM, EACCES, and EAGAIN errors

LizardLiang avatar Jan 05 '26 06:01 LizardLiang