nexu-io/open-design · error · Error

${def.name} CLI is not installed or not on PATH

Error message

${def.name} CLI is not installed or not on PATH

What it means

The agent definition exists in the registry, but resolveAgentLaunch could not find the agent's executable binary on the system PATH or via configured paths. The resolution returned no selectedPath, so launchPath is null. The agent CLI binary is not installed or not discoverable.

Source

Thrown at apps/daemon/src/memory-llm.ts:978

    });
  }

  const def = getAgentDef(provider.agentId);
  if (!def) {
    throw new Error(`Local CLI agent "${provider.agentId}" is not installed`);
  }

  let configuredAgentEnv = {};
  try {
    const appConfig = options?.dataDir ? await readAppConfig(options.dataDir) : {};
    configuredAgentEnv = agentCliEnvForAgent(appConfig.agentCliEnv, def.id);
  } catch {
    configuredAgentEnv = {};
  }

  const launch = resolveAgentLaunch(def, configuredAgentEnv);
  if (!launch?.launchPath) {
    throw new Error(`${def.name} CLI is not installed or not on PATH`);
  }

  // The memory extractor is a tool-less, JSON-only background call that never
  // reads project files, so it has no reason to run in the daemon's own cwd.
  // Falling back to process.cwd() there meant a bun-based agent (OpenCode) ran
  // its startup `bun install` in whatever directory the daemon was launched from
  // — clobbering a pnpm workspace (dev checkout). Use a neutral temp cwd.
  const cwd =
    typeof options?.projectRoot === 'string' && options.projectRoot.trim()
      ? options.projectRoot
      : os.tmpdir();
  const prompt = [
    system,
    '',
    'You are running as a background memory extractor. Do not use tools. Return strict JSON only.',
    '',
    user,
  ].join('\n');

View on GitHub (pinned to 5be4028344)

Solutions

  1. Install the missing agent CLI (e.g. npm install -g @anthropic-ai/claude-code, bun install -g opencode)
  2. Verify the binary is discoverable by running 'which claude' or 'which codex' in the daemon's environment
  3. Configure agentCliEnv in app config to point to the binary's directory
  4. Restart the daemon after installing so PATH is re-evaluated
Defensive patterns

Strategy: validation

Validate before calling

import { getAgentDef } from './runtimes/registry';
import { resolveAgentLaunch } from './runtimes/launch';
import { which } from 'shelljs'; // or use child_process.execSync('which ' + bin)

async function assertAgentBinaryAvailable(agentId) {
  const def = getAgentDef(agentId);
  if (!def) throw new Error(`Agent ${agentId} not registered`);
  const launch = resolveAgentLaunch(def, {});
  if (!launch?.launchPath) {
    throw new Error(`${def.name} CLI binary not found. Install it and ensure it is on PATH.`);
  }
  return launch;
}

Prevention

When it happens

Trigger: The agent binary (e.g. claude, codex, opencode) is not installed on the system; the binary exists but its directory is not on PATH; the configured agentCliEnv path override is wrong; GUI-launched daemon has a different PATH than the shell.

Common situations: Fresh machine without the agent CLI installed; PATH not including the agent's install directory (e.g. ~/.bun/bin for opencode, global npm bin for claude); agent CLI was uninstalled; daemon launched from GUI without inheriting shell PATH.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/3ebc92ffb7bb3efc. Report an issue: GitHub.