{"record":{"id":"73f0254776e2d32f","repo":"thedotmack/claude-mem","slug":"skipping-desktop-app-at-candidate-it-doesn","errorCode":null,"errorMessage":"Skipping desktop app at \"${candidate}\" — it doesn't support headless mode. Install Claude Code CLI: npm install -g @anthropic-ai/claude-code","messagePattern":"Skipping desktop app at \"(.+?)\" — it doesn't support headless mode\\. Install Claude Code CLI: npm install -g @anthropic-ai/claude-code","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/shared/find-claude-executable.ts","lineNumber":352,"sourceCode":"    const candidate = candidates[order];\n    const probe = probeCandidate(candidate);\n\n    if (probe.kind === 'capable') {\n      capable.push({ path: candidate, version: probe.version, key: parseVersionKey(probe.version), order });\n      continue;\n    }\n\n    if (probe.kind === 'incompatible') {\n      incompatible.push({ path: candidate, version: probe.version, detail: probe.detail });\n      logger.warn(\n        logComponent,\n        `Skipping \"${candidate}\" (${probe.version}) — too old for claude-mem: ${probe.detail}`\n      );\n      continue;\n    }\n\n    if (looksLikeDesktopAppPath(candidate)) {\n      logger.warn(\n        logComponent,\n        `Skipping desktop app at \"${candidate}\" — it doesn't support headless mode. ` +\n        `Install Claude Code CLI: npm install -g @anthropic-ai/claude-code`\n      );\n    } else {\n      logger.warn(logComponent, `Skipping \"${candidate}\" — failed --version check (${probe.detail})`);\n    }\n  }\n\n  if (capable.length > 0) {\n    capable.sort((a, b) => compareVersionKeysDesc(a.key, b.key) || a.order - b.order);\n    const winner = capable[0];\n    // 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    });","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/e2d1df569a8f04075d40e92461128ece7cf04c82/src/shared/find-claude-executable.ts#L334-L370","documentation":"A discovered candidate path that matches the Claude Desktop app bundle pattern (looksLikeDesktopAppPath) is skipped because the desktop app binary does not support the headless/print mode claude-mem needs. The warning directs the user to install the Claude Code CLI instead.","triggerScenarios":"A path like .../Claude.app/Contents/MacOS/... appears in the candidate list (usually because the .app binary directory leaked onto PATH or shell-history discovery picked it up) and its probe failed.","commonSituations":"Claude Desktop installed but CLI never installed; users adding the app's MacOS dir to PATH manually; shell integrations indexing app bundles.","solutions":["Install the CLI: npm install -g @anthropic-ai/claude-code.","Ensure the CLI's bin directory precedes any Claude.app path on PATH.","Verify `claude --version` in a shell resolves to the CLI binary, not the app bundle."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (looksLikeDesktopAppPath(candidate)) {\n  // desktop app cannot run headless — require the CLI instead\n  continue;\n}","typeGuard":"const isDesktopAppPath = (p: string): boolean => p.includes('Claude.app/');","tryCatchPattern":null,"preventionTips":["Install the Claude Code CLI (npm install -g @anthropic-ai/claude-code) even if you mainly use Desktop.","Never add the Claude.app Contents/MacOS directory to PATH.","Verify `claude --version` resolves to the CLI before enabling claude-mem."],"tags":["cli-discovery","desktop-app","headless-mode","claude-mem"],"backgroundTag":"incompatible-executable","analyzedSha":"e2d1df569a8f04075d40e92461128ece7cf04c82","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}