{"record":{"id":"e1b7c8ce783af37f","repo":"thedotmack/claude-mem","slug":"claude-code-path-is-set-to-describedpath-probe-version-but","errorCode":null,"errorMessage":"CLAUDE_CODE_PATH is set to ${describedPath} (${probe.version}) but that CLI is too old for claude-mem — it rejects flags every memory agent spawn requires (${probe.detail}). ${updateInstructions()}","messagePattern":"CLAUDE_CODE_PATH is set to (.+?) \\((.+?)\\) but that CLI is too old for claude-mem — it rejects flags every memory agent spawn requires \\((.+?)\\)\\. (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/find-claude-executable.ts","lineNumber":380,"sourceCode":"    const describedPath = describeConfiguredPath(settings.CLAUDE_CODE_PATH, configuredPath);\n    if (!_internals.existsSync(configuredPath)) {\n      throw new Error(\n        `CLAUDE_CODE_PATH is set to ${describedPath} but the file does not exist.`\n      );\n    }\n\n    const probe = probeCandidate(configuredPath);\n    if (probe.kind === 'capable') {\n      logger.info(logComponent, `Using configured CLAUDE_CODE_PATH: ${configuredPath} (${probe.version})`);\n      cachedResolution = {\n        path: configuredPath,\n        version: probe.version,\n        expiresAtMs: Date.now() + RESOLUTION_CACHE_TTL_MS,\n      };\n      return configuredPath;\n    }\n    if (probe.kind === 'incompatible') {\n      throw new Error(\n        `CLAUDE_CODE_PATH is set to ${describedPath} (${probe.version}) but that CLI is too old for claude-mem — ` +\n        `it rejects flags every memory agent spawn requires (${probe.detail}). ${updateInstructions()}`\n      );\n    }\n    if (looksLikeDesktopAppPath(configuredPath)) {\n      throw new Error(\n        `Found desktop app at ${describedPath} but it doesn't support headless mode. ` +\n        `Install Claude Code CLI: npm install -g @anthropic-ai/claude-code`\n      );\n    }\n    // existsSync passed above, so the file is really there — the probe failed.\n    // Split the two ways that happens. A launch failure (ENOENT from a launcher\n    // whose shebang interpreter is missing, or a native-installer stub pointing\n    // at a deleted version directory) means the OS never ran the file; a\n    // re-check of the path cannot fix it, so name the likely cause. A process\n    // that ran but exited non-zero, timed out, or printed no version is a\n    // different problem — do not claim it \"could not be executed\".\n    if (probe.launchFailed) {","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/shared/find-claude-executable.ts#L362-L398","documentation":"After CLAUDE_CODE_PATH passes the existence check, findClaudeExecutable runs a version probe on the binary. If the probe classifies the CLI as 'incompatible' — it rejects flags that every claude-mem memory-agent spawn requires — the library throws with the probed version and the specific rejection detail, plus update instructions.","triggerScenarios":"probeCandidate(configuredPath) returns kind === 'incompatible' for the CLAUDE_CODE_PATH binary: the file exists and executes, prints a version, but rejects required spawn flags during the capability probe.","commonSituations":"Pointing CLAUDE_CODE_PATH at an old cached install, a vendored Claude CLI bundled with an older tool, or a distro package that lags behind; claude-mem upgraded to require newer CLI flags while the CLI was pinned.","solutions":["Update Claude Code CLI: `npm install -g @anthropic-ai/claude-code@latest` (or the native installer's update command)","Check `claude --version` at the configured path and confirm it matches a current release; if not, fix CLAUDE_CODE_PATH to point at the updated binary","Remove CLAUDE_CODE_PATH so auto-discovery finds the newest installed CLI instead of the pinned old one"],"exampleFix":"// before: shell\nclaude --version   # 0.2.x, too old for claude-mem flags\n\n// after: shell\nnpm install -g @anthropic-ai/claude-code@latest\nclaude --version   # current, flags accepted","handlingStrategy":"validation","validationCode":"import { execFileSync } from 'child_process';\nconst v = execFileSync(settings.CLAUDE_CODE_PATH, ['--version'], { encoding: 'utf8' }).trim();\nconsole.log(`CLI at CLAUDE_CODE_PATH reports ${v}`); // compare against claude-mem's minimum","typeGuard":"null","tryCatchPattern":"try {\n  await findClaudeExecutable();\n} catch (e) {\n  if (e.message.includes('too old for claude-mem')) {\n    console.error('Update: npm install -g @anthropic-ai/claude-code@latest');\n  } else throw e;\n}","preventionTips":["Keep Claude Code on auto-update or update it alongside claude-mem","Avoid pinning old versions with nvm/volta per-project configs","Run `claude --version` in CI images before jobs that use claude-mem"],"tags":["version-compatibility","cli","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}