{"record":{"id":"62c09897b30779d7","repo":"rohitg00/agentmemory","slug":"adapter-displayname-not-detected-on-this-machi","errorCode":null,"errorMessage":"${adapter.displayName}: not detected on this machine (skipping).${adapter.docs ? ` Docs: ${adapter.docs}` : \"\"}","messagePattern":"(.+?): not detected on this machine \\(skipping\\)\\.(.+?)` : \"\"\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/cli/connect/index.ts","lineNumber":91,"sourceCode":"  let withHooks = false;\n  let guidelines = true; // memory-usage guideline is written by default\n  for (const a of args) {\n    if (a === \"--dry-run\") dryRun = true;\n    else if (a === \"--force\") force = true;\n    else if (a === \"--all\") all = true;\n    else if (a === \"--with-hooks\") withHooks = true;\n    else if (a === \"--no-guidelines\") guidelines = false;\n    else if (!a.startsWith(\"-\")) positional.push(a);\n  }\n  return { dryRun, force, all, withHooks, guidelines, positional };\n}\n\nexport async function runAdapter(\n  adapter: ConnectAdapter,\n  opts: ConnectOptions,\n): Promise<ConnectResult> {\n  if (!adapter.detect()) {\n    p.log.warn(\n      `${adapter.displayName}: not detected on this machine (skipping).${adapter.docs ? ` Docs: ${adapter.docs}` : \"\"}`,\n    );\n    return { kind: \"skipped\", reason: \"not-detected\" };\n  }\n  p.log.step(`Wiring ${adapter.displayName}…`);\n  if (adapter.protocolNote) {\n    p.log.message(adapter.protocolNote);\n  }\n  try {\n    const result = await adapter.install(opts);\n    // After MCP/hooks are wired, activate memory for hook-less agents by\n    // writing a memory-usage guideline into their native rules file. Best\n    // effort: never fail the connect over the guideline.\n    if (\n      opts.guidelines !== false &&\n      (result.kind === \"installed\" || result.kind === \"already-wired\")\n    ) {\n      try {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/rohitg00/agentmemory/blob/e04ba88819c365c9acf9d6661ea802143e728bd6/src/cli/connect/index.ts#L73-L109","documentation":"runConnect / wireSelectedAgents iterate connect adapters; before installing, runAdapter calls adapter.detect() to check whether that agent CLI exists on the machine. If detection fails, the CLI logs this warning naming the adapter and its docs URL, and returns { kind: \"skipped\", reason: \"not-detected\" } instead of attempting an install. This prevents wiring config for tools that aren't installed.","triggerScenarios":"Running `agentmemory connect <target>` (or the interactive multi-select flow) for an adapter whose detect() returns false — e.g. the adapter's config directory/file or binary is not present (existsSync check fails).","commonSituations":"Typos or partial target names; agent installed under a non-standard HOME/CONFIG path so existsSync misses it; agent installed via a container/sandbox the CLI can't see; forgetting that detection is based on config-dir presence, so the agent exists but was never launched.","solutions":["Confirm the target agent CLI is actually installed and has been launched at least once (its config dir/file must exist).","Check HOME / config-dir environment overrides that could hide the agent's config from existsSync; align them or create the expected directory.","If the agent is installed but detection still fails, wire it manually or open an issue referencing the adapter's detect() logic in src/cli/connect/.","Run `agentmemory connect` with no args for the interactive flow to see all detected adapters and pick valid ones."],"exampleFix":"// before\nagentmemory connect cursor\n// -> warning: Cursor: not detected on this machine (skipping).\n\n// after — launch the agent once so its config dir exists\nls ~/.cursor 2>/dev/null || (open cursor && sleep 5)\nagentmemory connect cursor   # detected; wiring proceeds","handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nfunction agentDetected(configDir: string): boolean {\n  return existsSync(join(process.env.HOME ?? \"\", configDir));\n}\n// before connecting:\nif (!agentDetected(\".cursor\")) console.warn(\"Cursor config not found — it may be skipped.\");","typeGuard":"type ConnectResult = { kind: \"installed\"; mutatedPath?: string } | { kind: \"skipped\"; reason: string };\nfunction isSkipped(r: ConnectResult): r is { kind: \"skipped\"; reason: string } {\n  return r.kind === \"skipped\";\n}","tryCatchPattern":"const result = await runAdapter(adapter, opts);\nif (result.kind === \"skipped\" && result.reason === \"not-detected\") {\n  console.warn(`${adapter.displayName} is not installed here — install/launch it first; see ${adapter.docs ?? \"docs\"}.`);\n}","preventionTips":["Install and launch the target agent CLI at least once so its config directory exists before connecting.","Check HOME / config-dir env overrides that can hide the agent's config from detection.","Use the interactive `agentmemory connect` flow to see which adapters are detected.","Treat the 'not detected' warning as informational — other selected adapters still get wired."],"tags":["detection","cli","adapter","skipped"],"backgroundTag":"adapter-not-detected","analyzedSha":"e04ba88819c365c9acf9d6661ea802143e728bd6","analyzedAt":"2026-08-30T01:07:40.754Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}