{"record":{"id":"66a3b4750aeb12a1","repo":"multica-ai/multica","slug":"no-agent-cli-found-install-claude-codebuddy-cod","errorCode":null,"errorMessage":"no agent CLI found: install claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, omp, cursor-agent, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, or qwenpaw and ensure it is on PATH","messagePattern":"no agent CLI found: install claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, omp, cursor-agent, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, or qwenpaw and ensure it is on PATH","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/config.go","lineNumber":240,"sourceCode":"\t\t// Per-machine custom-runtime command path overrides (MUL-3284).\n\t\t// Copy into our own map so later mutation of the loaded config can't\n\t\t// alias daemon state, and so an empty map normalizes to nil.\n\t\tif len(cliCfg.ProfileCommandOverrides) > 0 {\n\t\t\tprofileCommandOverrides = make(map[string]string, len(cliCfg.ProfileCommandOverrides))\n\t\t\tfor id, path := range cliCfg.ProfileCommandOverrides {\n\t\t\t\tif id == \"\" || strings.TrimSpace(path) == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tprofileCommandOverrides[id] = path\n\t\t\t}\n\t\t}\n\t}\n\n\t// Discover installed agent CLIs. Extracted so the periodic workspace sync\n\t// can re-run the same discovery on a live daemon (MUL-5439).\n\tagents := probeAgentCLIs()\n\tif len(agents) == 0 && !overrides.AllowNoAgents {\n\t\treturn Config{}, fmt.Errorf(\"no agent CLI found: install claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, omp, cursor-agent, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, or qwenpaw and ensure it is on PATH\")\n\t}\n\n\tclaudeArgs, err := shellArgsFromEnv(\"MULTICA_CLAUDE_ARGS\")\n\tif err != nil {\n\t\treturn Config{}, err\n\t}\n\tcodexArgs, err := shellArgsFromEnv(\"MULTICA_CODEX_ARGS\")\n\tif err != nil {\n\t\treturn Config{}, err\n\t}\n\tcodebuddyArgs, err := shellArgsFromEnv(\"MULTICA_CODEBUDDY_ARGS\")\n\tif err != nil {\n\t\treturn Config{}, err\n\t}\n\tqwenArgs, err := shellArgsFromEnv(\"MULTICA_QWEN_ARGS\")\n\tif err != nil {\n\t\treturn Config{}, err\n\t}","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/config.go#L222-L258","documentation":"Daemon config load fails when probeAgentCLIs() finds none of the ~22 supported agent CLIs (claude, codex, opencode, qwen, ...) on PATH and AllowNoAgents is not set. The daemon refuses to start because it would have nothing to execute tasks with. The error doubles as installation guidance listing every recognized agent.","triggerScenarios":"Starting the daemon on a machine with no agent CLI installed, with all of them installed outside PATH (npm global bins, ~/.local/bin not on PATH for the daemon's service context), or in a container/CI image that never installed one.","commonSituations":"Fresh machines, systemd/launchd services whose PATH is minimal (/usr/bin only, missing ~/.local/bin or nvm paths), devcontainers, and users who intentionally run daemon-only mode without agents.","solutions":["Install any one listed agent CLI (e.g. npm i -g @anthropic-ai/claude-code) and confirm 'which claude' works in the same shell/user the daemon runs as","If the agent exists but the daemon can't see it, fix PATH for the daemon context (systemd Environment=, launchd plist, or wrapper script)","If you deliberately want an agent-less daemon, set the AllowNoAgents override in the daemon config","Use a profile command override (profileCommandOverrides) to point at an absolute agent path if PATH discovery is unreliable"],"exampleFix":"// before\nagents := probeAgentCLIs()\nif len(agents) == 0 && !overrides.AllowNoAgents {\n    return Config{}, fmt.Errorf(\"no agent CLI found: install claude, ... or qwenpaw and ensure it is on PATH\")\n}\n\n// after: allow explicit opt-out via env for headless/relay deployments\nif len(agents) == 0 && !overrides.AllowNoAgents && os.Getenv(\"MULTICA_ALLOW_NO_AGENTS\") != \"1\" {\n    return Config{}, fmt.Errorf(\"no agent CLI found: install claude, ... or qwenpaw and ensure it is on PATH (or set MULTICA_ALLOW_NO_AGENTS=1 for agent-less mode)\")\n}","handlingStrategy":"fallback","validationCode":"// Before daemon start, verify at least one known agent is resolvable.\nexecutables := []string{\"claude\", \"codex\", \"opencode\", \"qwen\" /* ... */}\nfound := false\nfor _, name := range executables {\n    if _, err := exec.LookPath(name); err == nil {\n        found = true\n        break\n    }\n}\nif !found && !allowNoAgents {\n    // fail with actionable message before the daemon starts\n}","typeGuard":null,"tryCatchPattern":"Not a catch-and-continue case: handle at startup orchestration — catch the config error, print install guidance, and exit; or set AllowNoAgents to explicitly enter agent-less mode.","preventionTips":["For service contexts, set explicit PATH including npm/pnpm global bin dirs","Use absolute-path profile overrides when PATH discovery is unreliable","Bake at least one agent CLI into container images used for the daemon"],"tags":["daemon","config","path","agent-cli","startup"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}