thedotmack/claude-mem · warning

Skipping "${candidate}" — failed --version check (${probe.de

Error message

Skipping "${candidate}" — failed --version check (${probe.detail})

What it means

The candidate's --version probe failed outright (probe.detail carries why: non-zero exit, timeout, or unparseable output) and the path does not look like the desktop app, so it is skipped with this warning. Discovery keeps going; if no candidate proves capable, executable resolution fails downstream.

Source

Thrown at src/shared/find-claude-executable.ts:358

    }

    if (probe.kind === 'incompatible') {
      incompatible.push({ path: candidate, version: probe.version, detail: probe.detail });
      logger.warn(
        logComponent,
        `Skipping "${candidate}" (${probe.version}) — too old for claude-mem: ${probe.detail}`
      );
      continue;
    }

    if (looksLikeDesktopAppPath(candidate)) {
      logger.warn(
        logComponent,
        `Skipping desktop app at "${candidate}" — it doesn't support headless mode. ` +
        `Install Claude Code CLI: npm install -g @anthropic-ai/claude-code`
      );
    } else {
      logger.warn(logComponent, `Skipping "${candidate}" — failed --version check (${probe.detail})`);
    }
  }

  if (capable.length > 0) {
    capable.sort((a, b) => compareVersionKeysDesc(a.key, b.key) || a.order - b.order);
    const winner = capable[0];
    // INFO, not DEBUG: when observations silently stop, which binary the
    // worker picked is the first question — make it answerable from default logs.
    logger.info(logComponent, `Using Claude CLI v${winner.version} at ${winner.path}`, {
      candidatesProbed: candidates.length,
      skippedTooOld: incompatible.length,
    });
    cachedResolution = {
      path: winner.path,
      version: winner.version,
      expiresAtMs: Date.now() + RESOLUTION_CACHE_TTL_MS,
    };
    return winner.path;

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Run `<candidate> --version` manually in a shell and fix whatever error it prints.
  2. If the binary is corrupt, reinstall: npm install -g @anthropic-ai/claude-code.
  3. Prune dead shims found by `which -a claude` and `ls -l` on each hit.
Defensive patterns

Strategy: validation

Validate before calling

const probe = probeCandidate(candidate);
if (probe.kind === 'error') {
  // binary fails --version — exclude it from consideration up front
  continue;
}

Type guard

const isFailedProbe = (p: ProbeResult): boolean => p.kind !== 'capable' && p.kind !== 'incompatible';

Prevention

When it happens

Trigger: probeCandidate returns a failed probe for an ordinary path: broken shim, wrapper script that errors on --version, permission denied, corrupted binary, or dangling symlink.

Common situations: Half-completed npm installs after an interrupted upgrade; custom claude wrapper scripts that swallow --version; broken symlinks left after switching Node versions.

Related errors


AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20). Data as JSON: /api/errors/69a59483d65d9ea9. Report an issue: GitHub.