{"record":{"id":"4082205f1273e85e","repo":"chenhg5/cc-connect","slug":"qoder-q-not-found-in-path-install-with-curl-f","errorCode":null,"errorMessage":"qoder: %q not found in PATH, install with: curl -fsSL https://qoder.com/install | bash","messagePattern":"qoder: %q not found in PATH, install with: curl -fsSL https://qoder\\.com/install \\| bash","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/qoder/qoder.go","lineNumber":43,"sourceCode":"\tconfigEnv    []string // env vars from [projects.agent.options.env]\n\tmodel        string\n\tmode         string // \"default\" | \"yolo\"\n\tsessionEnv   []string\n\tmu           sync.Mutex\n}\n\nfunc New(opts map[string]any) (core.Agent, error) {\n\tworkDir, _ := opts[\"work_dir\"].(string)\n\tif workDir == \"\" {\n\t\tworkDir = \".\"\n\t}\n\tmodel, _ := opts[\"model\"].(string)\n\tmode, _ := opts[\"mode\"].(string)\n\tmode = normalizeMode(mode)\n\n\tcmd, extraArgs := core.ParseCmdOpts(opts, \"qodercli\")\n\tif _, err := exec.LookPath(cmd); err != nil {\n\t\treturn nil, fmt.Errorf(\"qoder: %q not found in PATH, install with: curl -fsSL https://qoder.com/install | bash\", cmd)\n\t}\n\n\treturn &Agent{\n\t\tworkDir:      workDir,\n\t\tcmd:          cmd,\n\t\tcliExtraArgs: extraArgs,\n\t\tconfigEnv:    core.ParseConfigEnv(opts),\n\t\tmodel:        model,\n\t\tmode:         mode,\n\t}, nil\n}\n\nfunc normalizeMode(raw string) string {\n\tswitch strings.ToLower(strings.TrimSpace(raw)) {\n\tcase \"yolo\", \"bypass\", \"dangerously-skip-permissions\":\n\t\treturn \"yolo\"\n\tdefault:\n\t\treturn \"default\"","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/qoder/qoder.go#L25-L61","documentation":"New in agent/qoder/qoder.go fails during agent construction when exec.LookPath cannot find the configured qoder CLI binary in PATH. The error names the exact command looked up (from opts key \"qodercli\", default \"qodercli\") and includes the vendor install one-liner.","triggerScenarios":"Creating a qoder agent (core.CreateAgent(\"qoder\", opts)) on a machine where the qoder binary is not installed, or where opts[\"qodercli\"] names a binary that does not exist in PATH.","commonSituations":"Fresh server/container without the qoder CLI installed; PATH missing the install directory (e.g. ~/.local/bin not in PATH under systemd); typo'd custom command name in config.toml options.","solutions":["Install the CLI: curl -fsSL https://qoder.com/install | bash","Verify with `which qodercli` that the binary resolves in the same environment the daemon runs in","If a custom binary is configured, check the \"qodercli\" option in config.toml for typos","Fix the service PATH (systemd Environment= or absolute cmd path) if it differs from your shell PATH"],"exampleFix":"// config.toml before\n[agents.qoder]\ncommand = \"qoder-cli-wrong\"\n// after\n[agents.qoder]\ncommand = \"qodercli\"  # or ensure it is installed and in PATH","handlingStrategy":"validation","validationCode":"if _, err := exec.LookPath(\"qodercli\"); err != nil {\n    return errors.New(\"qoder CLI not installed; run: curl -fsSL https://qoder.com/install | bash\")\n}","typeGuard":null,"tryCatchPattern":"agent, err := qoder.New(opts)\nif err != nil {\n    if strings.Contains(err.Error(), \"not found in PATH\") {\n        // surface install instructions to the operator\n    }\n    return err\n}","preventionTips":["Install the qoder CLI before enabling the qoder agent in config.toml","Verify `which qodercli` in the daemon's runtime environment (systemd PATH differs from shell)","Use absolute binary paths in config for services","Add the doctor/health check to startup validation"],"tags":["go","cli","path","installation"],"backgroundTag":"command-not-found","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}