Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/utils/resolve-binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down