{"record":{"id":"5f5362425d457212","repo":"nikivdev/code","slug":"hive-not-found-on-path","errorCode":null,"errorMessage":"hive not found on PATH","messagePattern":"hive not found on PATH","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/hive.rs","lineNumber":338,"sourceCode":"        .stderr(Stdio::inherit())\n        .status()\n        .context(\"Failed to run hive\")?;\n\n    if !status.success() {\n        anyhow::bail!(\n            \"hive agent '{}' exited with status {:?}\",\n            agent,\n            status.code()\n        );\n    }\n\n    Ok(())\n}\n\n/// Run an agent interactively (prompt via stdin)\npub fn run_agent_interactive(agent: &str) -> Result<()> {\n    if which::which(\"hive\").is_err() {\n        anyhow::bail!(\"hive not found on PATH\");\n    }\n\n    let status = Command::new(\"hive\")\n        .arg(\"agent\")\n        .arg(agent)\n        .stdin(Stdio::inherit())\n        .stdout(Stdio::inherit())\n        .stderr(Stdio::inherit())\n        .status()\n        .context(\"Failed to run hive\")?;\n\n    if !status.success() {\n        anyhow::bail!(\n            \"hive agent '{}' exited with status {:?}\",\n            agent,\n            status.code()\n        );\n    }","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/hive.rs#L320-L356","documentation":"`run_agent_interactive` runs `hive agent <agent>` with inherited stdin/stdout/stderr so the user can type the prompt interactively. Like `run_agent`, it first probes for `hive` on PATH and bails with this shorter message if the binary is absent. The error fires before the subprocess starts.","triggerScenarios":"Invoking the interactive agent flow where `hive` is not installed or not reachable via the current PATH (bare env, restricted shell, container).","commonSituations":"Same as the non-interactive case: fresh machine without hive; CI/cron environments with minimal PATH; nix/venv shells excluding the hive install dir.","solutions":["Install hive and confirm with `which hive`","Add hive's install directory to PATH in your shell profile","Run inside a normal interactive shell that inherits your full PATH","Symlink the binary into a PATH directory if it is installed under a non-standard name/path"],"exampleFix":"# before\nf agent reviewer   # interactive, hive missing\n# after\nexport PATH=\"$PATH:$HOME/.local/bin\"  # where hive lives\nwhich hive && f agent reviewer","handlingStrategy":"validation","validationCode":"if which::which(\"hive\").is_err() {\n    eprintln!(\"hive is not installed or not on PATH; install it before using interactive agents\");\n    std::process::exit(127);\n}","typeGuard":"fn hive_available() -> bool {\n    which::which(\"hive\").is_ok()\n}","tryCatchPattern":"if !hive_available() {\n    eprintln!(\"hive missing — skipping interactive agent\");\n    return Ok(()); // or prompt to install\n}\nhive::run_agent_interactive(agent)?;","preventionTips":["Check for hive before entering any interactive flow to fail fast","Ensure shell profiles export the directory containing hive","In containers, bake hive into the image","Offer a non-interactive fallback when hive is unavailable"],"tags":["path","external-binary","cli","interactive"],"backgroundTag":"command-not-found","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}