{"record":{"id":"cae69b92175c9b31","repo":"chenhg5/cc-connect","slug":"iflow-q-cli-not-found-in-path-install-with-npm","errorCode":null,"errorMessage":"iflow: %q CLI not found in PATH, install with: npm i -g @iflow-ai/iflow-cli","messagePattern":"iflow: %q CLI not found in PATH, install with: npm i -g @iflow-ai/iflow-cli","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/iflow/iflow.go","lineNumber":58,"sourceCode":"\ttoolTimeoutSec int\n\tproviders      []core.ProviderConfig\n\tactiveIdx      int\n\tsessionEnv     []string\n\tmu             sync.RWMutex\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\tcmd, extraArgs := core.ParseCmdOpts(opts, \"iflow\")\n\n\tif _, err := exec.LookPath(cmd); err != nil {\n\t\treturn nil, fmt.Errorf(\"iflow: %q CLI not found in PATH, install with: npm i -g @iflow-ai/iflow-cli\", cmd)\n\t}\n\n\tvar toolTimeoutSec int\n\tswitch v := opts[\"tool_timeout_secs\"].(type) {\n\tcase int64:\n\t\ttoolTimeoutSec = int(v)\n\tcase int:\n\t\ttoolTimeoutSec = v\n\tcase float64:\n\t\ttoolTimeoutSec = int(v)\n\t}\n\n\treturn &Agent{\n\t\tworkDir:        workDir,\n\t\tmodel:          model,\n\t\tmode:           mode,\n\t\tcmd:            cmd,\n\t\tcliExtraArgs:   extraArgs,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/iflow/iflow.go#L40-L76","documentation":"Pre-flight validation in the iflow agent factory (New): exec.LookPath cannot find the configured iflow CLI. The %q is the command looked up. The message includes the exact npm install command to remediate.","triggerScenarios":"Thrown at agent/iflow/iflow.go:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the CLI: npm i -g @iflow-ai/iflow-cli","Put the install directory on the daemon PATH","Or set the agent cmd option to the absolute binary path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}