openclaw - 💡(How to fix) Fix EPERM on Windows during skills update - movePathWithCopyFallback only catches EXDEV

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: EPERM: operation not permitted, rename '...\skills\skill-name' -> '...\skills.openclaw-install-backups\skill-name-...'

Root Cause

In dist/replace-file-C7_Inj8B.js, the movePathWithCopyFallback$1 function catches only EXDEV to trigger the copy fallback, but on Windows when the Gateway process is watching the skills directory (for hot-reload), rename returns EPERM instead:

// Current code (line ~445)
} catch (error) {
    if (error?.code !== "EXDEV") throw error;
    // EPERM is NOT caught → throws instead of falling back to copy
}

Fix Action

Fix

Add EPERM to the catch condition so it also falls back to copy+rename:

} catch (error) {
    if (error?.code !== "EXDEV" && error?.code !== "EPERM") throw error;
}

Code Example

Error: EPERM: operation not permitted, rename '...\skills\skill-name' -> '...\skills\.openclaw-install-backups\skill-name-...'

---

// Current code (line ~445)
} catch (error) {
    if (error?.code !== "EXDEV") throw error;
    // EPERM is NOT caught → throws instead of falling back to copy
}

---

} catch (error) {
    if (error?.code !== "EXDEV" && error?.code !== "EPERM") throw error;
}
RAW_BUFFERClick to expand / collapse

EPERM on Windows during openclaw skills update --all

Environment

  • OS: Windows 11 (10.0.26200)
  • OpenClaw: 2026.5.27
  • Node: v24.15.0

Problem

Running openclaw skills update --all fails with EPERM on every skill:

Error: EPERM: operation not permitted, rename '...\skills\skill-name' -> '...\skills\.openclaw-install-backups\skill-name-...'

Root Cause

In dist/replace-file-C7_Inj8B.js, the movePathWithCopyFallback$1 function catches only EXDEV to trigger the copy fallback, but on Windows when the Gateway process is watching the skills directory (for hot-reload), rename returns EPERM instead:

// Current code (line ~445)
} catch (error) {
    if (error?.code !== "EXDEV") throw error;
    // EPERM is NOT caught → throws instead of falling back to copy
}

Fix

Add EPERM to the catch condition so it also falls back to copy+rename:

} catch (error) {
    if (error?.code !== "EXDEV" && error?.code !== "EPERM") throw error;
}

Why this is safe

The copy fallback (copyEntryWithManifest + guardedRename) is already implemented and handles directories correctly. It just wasn't being triggered for EPERM errors. On Windows, EPERM during rename is a common scenario (file locking by other processes) and should use the same fallback as EXDEV.

Suggested fix location

File: src/infra/replace-file.ts (or the compiled dist/replace-file-C7_Inj8B.js) Function: movePathWithCopyFallback$1

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix EPERM on Windows during skills update - movePathWithCopyFallback only catches EXDEV