rohitg00/agentmemory · info
${adapter.displayName}: not detected on this machine (skippi
Error message
${adapter.displayName}: not detected on this machine (skipping).${adapter.docs ? ` Docs: ${adapter.docs}` : ""} What it means
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.
Source
Thrown at src/cli/connect/index.ts:91
let withHooks = false;
let guidelines = true; // memory-usage guideline is written by default
for (const a of args) {
if (a === "--dry-run") dryRun = true;
else if (a === "--force") force = true;
else if (a === "--all") all = true;
else if (a === "--with-hooks") withHooks = true;
else if (a === "--no-guidelines") guidelines = false;
else if (!a.startsWith("-")) positional.push(a);
}
return { dryRun, force, all, withHooks, guidelines, positional };
}
export async function runAdapter(
adapter: ConnectAdapter,
opts: ConnectOptions,
): Promise<ConnectResult> {
if (!adapter.detect()) {
p.log.warn(
`${adapter.displayName}: not detected on this machine (skipping).${adapter.docs ? ` Docs: ${adapter.docs}` : ""}`,
);
return { kind: "skipped", reason: "not-detected" };
}
p.log.step(`Wiring ${adapter.displayName}…`);
if (adapter.protocolNote) {
p.log.message(adapter.protocolNote);
}
try {
const result = await adapter.install(opts);
// After MCP/hooks are wired, activate memory for hook-less agents by
// writing a memory-usage guideline into their native rules file. Best
// effort: never fail the connect over the guideline.
if (
opts.guidelines !== false &&
(result.kind === "installed" || result.kind === "already-wired")
) {
try {View on GitHub (pinned to e04ba88819)
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.
Example fix
// before agentmemory connect cursor // -> warning: Cursor: not detected on this machine (skipping). // after — launch the agent once so its config dir exists ls ~/.cursor 2>/dev/null || (open cursor && sleep 5) agentmemory connect cursor # detected; wiring proceeds
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from "node:fs";
import { join } from "node:path";
function agentDetected(configDir: string): boolean {
return existsSync(join(process.env.HOME ?? "", configDir));
}
// before connecting:
if (!agentDetected(".cursor")) console.warn("Cursor config not found — it may be skipped."); Type guard
type ConnectResult = { kind: "installed"; mutatedPath?: string } | { kind: "skipped"; reason: string };
function isSkipped(r: ConnectResult): r is { kind: "skipped"; reason: string } {
return r.kind === "skipped";
} Try / catch
const result = await runAdapter(adapter, opts);
if (result.kind === "skipped" && result.reason === "not-detected") {
console.warn(`${adapter.displayName} is not installed here — install/launch it first; see ${adapter.docs ?? "docs"}.`);
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- ${config.displayName} hooks skipped: ${hookResult.reason}.
- ${config.displayName} hooks skipped: ${hookResult.reason}. M
- POST ${url} failed: ${res.status} ${res.statusText}${suffix}
- agentmemory: could not locate bundled plugin/ directory (sea
- observe failed for ${obs.toolName}: ${res.status} ${res.stat
AI-assisted analysis of rohitg00/agentmemory@e04ba88819 (2026-08-30).
Data as JSON: /api/errors/62c09897b30779d7.
Report an issue: GitHub.