{"record":{"id":"7941cbeb1d20e2fd","repo":"gitbutlerapp/gitbutler","slug":"no-supported-agent-was-detected-in-non-interactiv","errorCode":null,"errorMessage":"No supported agent was detected. In non-interactive mode, specify --path or --detect. Use --path <path> to choose an installation directory, or --detect to update an existing installation.","messagePattern":"No supported agent was detected\\. In non-interactive mode, specify --path or --detect\\. Use --path <path> to choose an installation directory, or --detect to update an existing installation\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/command/skill/mod.rs","lineNumber":875,"sourceCode":"        .prompt_select(\"Where would you like to install the skill?\", &options)?\n        .copied()\n    {\n        Some(InstallScopeOption::Local) => Ok(InstallScope::Local),\n        Some(InstallScopeOption::Global) => Ok(InstallScope::Global),\n        None => Err(UserCancelled.into()),\n    }\n}\n\n/// Prompt user to select installation scope and format\nfn prompt_for_install_path(\n    ctx: Option<&mut Context>,\n    global: bool,\n    out: &mut OutputChannel,\n    progress: &mut impl std::io::Write,\n) -> Result<PathBuf> {\n    let t = theme::get();\n    if out.for_human().is_none() {\n        anyhow::bail!(\n            \"No supported agent was detected. In non-interactive mode, specify --path or --detect. Use --path <path> to choose an installation directory, or --detect to update an existing installation.\"\n        );\n    }\n    if !out.can_prompt() {\n        anyhow::bail!(\n            \"Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts.\"\n        );\n    }\n\n    let local_scope_available = if !global {\n        match ctx.as_ref() {\n            Some(ctx) => {\n                let repo = ctx.repo.get()?;\n                repo.workdir().is_some()\n            }\n            None => false,\n        }\n    } else {","sourceCodeStart":857,"sourceCodeEnd":893,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but/src/command/skill/mod.rs#L857-L893","documentation":"When `but skill install` cannot infer an installation path (no --path, no --detect, and no driving agent detected to supply a default), it falls back to interactive prompting in prompt_for_install_path. Prompting is impossible when the output channel is not human-readable (out.for_human() is None: piped stdout or --output-format json), so the command aborts and lists the non-interactive options.","triggerScenarios":"`but skill install` with stdout piped (e.g. `| tee log`), run with --output-format json, or executed in CI where for_human() returns None and detect_agent found no supported agent to derive a default path.","commonSituations":"CI/CD pipelines installing skills, agent harnesses driving the CLI without a TTY, Docker build steps, piping output to a file or pager.","solutions":["Pass `--path <dir>` to choose the installation directory explicitly","Pass `--detect` to update an existing installation non-interactively","Run the command in a real terminal so interactive prompting works"],"exampleFix":"$ but skill install | tee install.log        # fails: no human output\n$ but skill install --path ~/.claude/skills  # non-interactive OK","handlingStrategy":"validation","validationCode":"use std::io::IsTerminal;\n// before invoking in scripts:\nif !std::io::stdout().is_terminal() {\n    cmd.args([\"--path\", explicit_dir]); // never rely on prompts when piped\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Scripts should always pass --path or --detect","Treat non-TTY environments as requiring explicit flags","Smoke-test install steps with piped output in CI to catch this early"],"tags":["cli","non-interactive","tty","skill","install"],"backgroundTag":"interactive-prompt-unavailable","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}