thedotmack/claude-mem · error · Error
Found desktop app at
Error message
Found desktop app at "${settings.CLAUDE_CODE_PATH}" but it doesn't support headless mode. Install Claude Code CLI: npm install -g @anthropic-ai/claude-code What it means
The configured CLAUDE_CODE_PATH exists but looksLikeDesktopAppPath matches it (it is the Claude desktop app binary, not the CLI) and the probe was not capable — desktop app builds do not support the headless mode claude-mem spawns require. The message tells you to install the real CLI instead, since the desktop app cannot be made headless-capable.
Solutions
- Install the CLI: npm install -g @anthropic-ai/claude-code.
- Update CLAUDE_CODE_PATH to the CLI binary (or remove the setting so PATH discovery finds it).
- Keep the desktop app if you use it — it just cannot serve as claude-mem's agent runtime.
Example fix
// settings.json before
{ "CLAUDE_CODE_PATH": "/Applications/Claude.app/Contents/MacOS/Claude" }
// after
{ "CLAUDE_CODE_PATH": "~/.npm-global/bin/claude" } Defensive patterns
Strategy: validation
Validate before calling
function looksLikeDesktopAppPath(p: string): boolean {
return /[Cc]laude\.app|Claude\.exe|AppData.{0,40}Claude/i.test(p);
}
if (looksLikeDesktopAppPath(settings.CLAUDE_CODE_PATH ?? '')) {
throw new Error('CLAUDE_CODE_PATH points at the desktop app — install the CLI instead: npm install -g @anthropic-ai/claude-code');
} Prevention
- Never configure the desktop app bundle path; headless spawns require the CLI binary.
- When autocomplete offers a claude binary, verify it is the npm-installed CLI, not the app.
- Keep the CLI installed even if you primarily use the desktop app — claude-mem depends on it.
When it happens
Trigger: CLAUDE_CODE_PATH pointing into the desktop app's install directory (e.g. an app bundle or AppData path) that ships a claude-like binary; users auto-completing to the wrong binary when configuring settings.json.
Common situations: Claude Desktop installed alongside the CLI and the wrong path captured in settings; OS-level path suggestions offering the app binary; migrating configs between machines where only the desktop app exists.
Related errors
- CLAUDE_CODE_PATH is set to
- CLAUDE_CODE_PATH is set to
- CLAUDE_CODE_PATH is set to
- Skipping desktop app at
AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20).
Data as JSON: /api/errors/c8a8645ced2e48d4.
Report an issue: GitHub.
Appendix: source
Thrown at src/shared/find-claude-executable.ts:317
const probe = probeCandidate(configuredPath);
if (probe.kind === 'capable') {
logger.info(logComponent, `Using configured CLAUDE_CODE_PATH: ${configuredPath} (${probe.version})`);
cachedResolution = {
path: configuredPath,
version: probe.version,
expiresAtMs: Date.now() + RESOLUTION_CACHE_TTL_MS,
};
return configuredPath;
}
if (probe.kind === 'incompatible') {
throw new Error(
`CLAUDE_CODE_PATH is set to "${settings.CLAUDE_CODE_PATH}" (${probe.version}) but that CLI is too old for claude-mem — ` +
`it rejects flags every memory agent spawn requires (${probe.detail}). ${updateInstructions()}`
);
}
if (looksLikeDesktopAppPath(configuredPath)) {
throw new Error(
`Found desktop app at "${settings.CLAUDE_CODE_PATH}" but it doesn't support headless mode. ` +
`Install Claude Code CLI: npm install -g @anthropic-ai/claude-code`
);
}
throw new Error(
`CLAUDE_CODE_PATH is set to "${settings.CLAUDE_CODE_PATH}" but it failed the --version check (${probe.detail}). ` +
`Ensure this is a working Claude Code CLI binary.`
);
}
// --- 2. Probe every discovered candidate ---------------------------------
const capable: Array<{ path: string; version: string; key: [number, number, number]; order: number }> = [];
const incompatible: Array<{ path: string; version: string; detail: string }> = [];
const candidates = discoverCandidates();
for (let order = 0; order < candidates.length; order++) {
const candidate = candidates[order];
const probe = probeCandidate(candidate);View on GitHub (pinned to e2d1df569a)