nikivdev/code · error

No prompt provided.

Error message

No prompt provided.

What it means

run_flow_agent_capture_streaming (public API in src/agents.rs) streams agent output while capturing the final response. Like run_flow_agent_capture it unconditionally calls find_gen() and bails with the install message when the gen tool/repo cannot be found, before any streaming starts.

Source

Thrown at src/agents.rs:319

        println!("fzf not found on PATH – install it to use fuzzy selection.");
        list_agents()?;
        return Ok(());
    }

    if let Some(result) = run_agent_fzf(&entries)? {
        let prompt_args = if result.with_args {
            prompt_for_agent_prompt(&result.entry.name)?
        } else if DIR_AGENTS.contains(&result.entry.name.as_str()) {
            // Directory-based agents use cwd by default
            let cwd = std::env::current_dir()
                .map(|p| p.to_string_lossy().to_string())
                .unwrap_or_else(|_| ".".to_string());
            vec![cwd]
        } else {
            prompt_for_agent_prompt(&result.entry.name)?
        };
        if prompt_args.is_empty() {
            bail!("No prompt provided.");
        }
        run_agent(&result.entry.name, prompt_args)?;
    }

    Ok(())
}

/// Copy agent instructions to clipboard.
fn copy_agent_instructions(agent_name: Option<&str>) -> Result<()> {
    let entries = build_agent_entries()?;
    if entries.is_empty() {
        println!("No agents available.");
        return Ok(());
    }

    let selected = if let Some(name) = agent_name {
        // Find agent by name
        entries

View on GitHub (pinned to a747e741ae)

Solutions

  1. Install gen: cd <gen_repo_hint> && f install.
  2. Export GEN_REPO pointing at the gen repo in the shell/profile that launches the program.
  3. Pre-check gen availability (PATH/env) in the host application before invoking the streaming API.

Example fix

// before (cron env lacks GEN_REPO)
0 * * * * flow-stream-job
// after
+ 0 * * * * GEN_REPO=/home/user/src/gen flow-stream-job
Defensive patterns

Strategy: try-catch

Validate before calling

if std::env::var("GEN_REPO").is_err() && which::which("gen").is_err() {
    return Err(anyhow!("gen unavailable; export GEN_REPO first"));
}

Try / catch

match agents::run_flow_agent_capture_streaming(prompt) {
    Err(e) if e.to_string().contains("gen not found") => {
        eprintln!("streaming needs gen; install it or set GEN_REPO");
    }
    Ok(text) => text,
}

Prevention

When it happens

Trigger: Calling flow::agents::run_flow_agent_capture_streaming(prompt) when gen is not installed/locatable — error is raised immediately, prior to prompt validation or streaming.

Common situations: Same as run_flow_agent_capture: missing gen checkout on dev machine or CI; GEN_REPO not exported in the process environment (e.g. launched from a GUI app with a minimal environment).

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/d7e2969c34b12be3. Report an issue: GitHub.