From 4d4866bac49a76c24f04c3f674272b5127d6cab6 Mon Sep 17 00:00:00 2001 From: "Jarvis (OpenClaw)" Date: Sat, 7 Mar 2026 15:08:27 -0800 Subject: [PATCH] fix: update resolve-binary util --- src/utils/resolve-binary.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/resolve-binary.ts b/src/utils/resolve-binary.ts index 0f267e9..1b556dd 100644 --- a/src/utils/resolve-binary.ts +++ b/src/utils/resolve-binary.ts @@ -41,11 +41,12 @@ export async function resolveBinaryPath( for (const c of candidates) { try { await fs.access(c, fs.constants.X_OK); - // Resolve symlinks to get the actual binary path - const resolved = await fs.realpath(c); - await fs.access(resolved, fs.constants.X_OK); - resolvedCache.set(name, resolved); - return resolved; + // Don't resolve symlinks — spawn the symlink path directly and let + // the OS resolve it. This avoids stale cache entries when binaries + // are upgraded (e.g., Claude Code version bumps update the symlink + // target but the daemon's cached realpath points to the old version). + resolvedCache.set(name, c); + return c; } catch { // Try next }