{"record":{"id":"0c2573ceb7af90b7","repo":"thedotmack/claude-mem","slug":"every-claude-cli-found-is-too-old-for-claude-mem","errorCode":null,"errorMessage":"Every Claude CLI found is too old for claude-mem (each rejects flags the memory agent passes on every spawn):\n${lines}\n${updateInstructions()}","messagePattern":"Every Claude CLI found is too old for claude-mem \\(each rejects flags the memory agent passes on every spawn\\):\n(.+?)\n(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"src/shared/find-claude-executable.ts","lineNumber":383,"sourceCode":"    // INFO, not DEBUG: when observations silently stop, which binary the\n    // worker picked is the first question — make it answerable from default logs.\n    logger.info(logComponent, `Using Claude CLI v${winner.version} at ${winner.path}`, {\n      candidatesProbed: candidates.length,\n      skippedTooOld: incompatible.length,\n    });\n    cachedResolution = {\n      path: winner.path,\n      version: winner.version,\n      expiresAtMs: Date.now() + RESOLUTION_CACHE_TTL_MS,\n    };\n    return winner.path;\n  }\n\n  if (incompatible.length > 0) {\n    const lines = incompatible\n      .map((entry) => `  - ${entry.path} (${entry.version}) — ${entry.detail}`)\n      .join('\\n');\n    throw new Error(\n      `Every Claude CLI found is too old for claude-mem (each rejects flags the memory agent passes on every spawn):\\n` +\n      `${lines}\\n${updateInstructions()}`\n    );\n  }\n\n  throw new Error(\n    'Claude executable not found. Please either:\\n' +\n    '1. Add \"claude\" to your system PATH, or\\n' +\n    '2. Set CLAUDE_CODE_PATH in ~/.claude-mem/settings.json'\n  );\n}\n","sourceCodeStart":365,"sourceCodeEnd":395,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d768ba364302d12b76e69e4f021f0bb1d2d50ed6/src/shared/find-claude-executable.ts#L365-L395","documentation":"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.","triggerScenarios":"discoverCandidates() returned one or more claude binaries, all probed 'incompatible'; none 'capable'. No explicit CLAUDE_CODE_PATH set.","commonSituations":"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.","solutions":["Update the CLI: `npm install -g @anthropic-ai/claude-code` so a capable version is on PATH.","Remove old claude binaries (the message lists each path/version) to avoid confusion.","Alternatively, set CLAUDE_CODE_PATH to a known-capable binary's absolute path.","Re-run; the boot log lists which candidates were probed and skipped."],"exampleFix":"// before: only claude v0.1.x on PATH\n// after\nnpm install -g @anthropic-ai/claude-code\nclaude --version  # confirm meets minimum","handlingStrategy":"try-catch","validationCode":"// Pre-flight: confirm at least one capable CLI exists\nconst candidates = discoverCandidates();\nconst capable = candidates.filter(c => probeCandidate(c).kind === 'capable');\nif (capable.length === 0) {\n  throw new Error('No capable Claude CLI found — run npm install -g @anthropic-ai/claude-code');\n}","typeGuard":null,"tryCatchPattern":"try {\n  return findClaudeExecutable('SDK');\n} catch (err) {\n  if (err instanceof Error && /too old for claude-mem/.test(err.message)) {\n    logger.error('SDK', err.message);\n    // guide update; optionally set CLAUDE_CODE_PATH to a capable binary\n  }\n  throw err;\n}","preventionTips":["Maintain at least one up-to-date @anthropic-ai/claude-code on PATH.","Remove stale old binaries that confuse discovery.","Add a CI/env check that a capable claude is present."],"tags":["claude-cli","version-compat","path-resolution","environment"],"backgroundTag":null,"analyzedSha":"d768ba364302d12b76e69e4f021f0bb1d2d50ed6","analyzedAt":"2026-08-12T23:52:55.241Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}