thedotmack/claude-mem · critical · Error

Every Claude CLI found is too old for claude-mem (each rejec

Error message

Every Claude CLI found is too old for claude-mem (each rejects flags the memory agent passes on every spawn):
${lines}
${updateInstructions()}

What it means

Thrown by findClaudeExecutable during PATH/candidate discovery (no CLAUDE_CODE_PATH set): at least one claude candidate was found (incompatible.length > 0) but every one probed as 'incompatible' — too old, each rejecting required flags. The message lists each path, version, and detail, plus update instructions. No 'capable' candidate existed.

Source

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

    // 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;
  }

  if (incompatible.length > 0) {
    const lines = incompatible
      .map((entry) => `  - ${entry.path} (${entry.version}) — ${entry.detail}`)
      .join('\n');
    throw new Error(
      `Every Claude CLI found is too old for claude-mem (each rejects flags the memory agent passes on every spawn):\n` +
      `${lines}\n${updateInstructions()}`
    );
  }

  throw new Error(
    'Claude executable not found. Please either:\n' +
    '1. Add "claude" to your system PATH, or\n' +
    '2. Set CLAUDE_CODE_PATH in ~/.claude-mem/settings.json'
  );
}

View on GitHub (pinned to d768ba3643)

Solutions

  1. Update the CLI: `npm install -g @anthropic-ai/claude-code` so a capable version is on PATH.
  2. Remove old claude binaries (the message lists each path/version) to avoid confusion.
  3. Alternatively, set CLAUDE_CODE_PATH to a known-capable binary's absolute path.
  4. Re-run; the boot log lists which candidates were probed and skipped.

Example fix

// before: only claude v0.1.x on PATH
// after
npm install -g @anthropic-ai/claude-code
claude --version  # confirm meets minimum
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight: confirm at least one capable CLI exists
const candidates = discoverCandidates();
const capable = candidates.filter(c => probeCandidate(c).kind === 'capable');
if (capable.length === 0) {
  throw new Error('No capable Claude CLI found — run npm install -g @anthropic-ai/claude-code');
}

Try / catch

try {
  return findClaudeExecutable('SDK');
} catch (err) {
  if (err instanceof Error && /too old for claude-mem/.test(err.message)) {
    logger.error('SDK', err.message);
    // guide update; optionally set CLAUDE_CODE_PATH to a capable binary
  }
  throw err;
}

Prevention

When it happens

Trigger: discoverCandidates() returned one or more claude binaries, all probed 'incompatible'; none 'capable'. No explicit CLAUDE_CODE_PATH set.

Common situations: Only an old @anthropic-ai/claude-code is installed globally; multiple old binaries scattered across known locations; the system has claude but predates the headless-flag support.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12). Data as JSON: /api/errors/0c2573ceb7af90b7. Report an issue: GitHub.