nikivdev/code · error
No profile selected.
Error message
No profile selected.
What it means
run_agent in src/agents.rs dispatches to a configured tool; when the configured tool is neither "claude" nor "opencode" it falls back to invoking `gen`, and bails with the same install message if find_gen() returns None. This is the runtime-invoke counterpart of the entry-list error (agents.rs:776).
Source
Thrown at src/agents.rs:273
}
}
fn prompt_agents_profile(profiles: &[String]) -> Result<String> {
println!("Select an agents profile:");
for (index, profile) in profiles.iter().enumerate() {
println!(" {}) {}", index + 1, profile);
}
print!("choice> ");
io::stdout().flush()?;
let stdin = io::stdin();
let line = stdin.lock().lines().next();
let input = match line {
Some(Ok(value)) => value.trim().to_string(),
_ => "".to_string(),
};
if input.is_empty() {
bail!("No profile selected.");
}
let idx: usize = input.parse().context("invalid selection")?;
if idx == 0 || idx > profiles.len() {
bail!("Selection out of range.");
}
Ok(profiles[idx - 1].clone())
}
struct AgentEntry {
name: String,
display: String,
path: Option<PathBuf>,
}
struct FzfAgentResult<'a> {
entry: &'a AgentEntry,
with_args: bool,
}View on GitHub (pinned to a747e741ae)
Solutions
- Install gen: cd <gen_repo_hint> && f install, or set GEN_REPO to the gen repo path.
- Fix the agent config tool value to "claude" or "opencode" if gen was not intended.
- Check get_agent_config source (env/config file) for a typo in the tool name.
Example fix
// before (config) tool = "gen" // after (either install gen) + export GEN_REPO=~/src/gen + flow agent review "..." // or switch tool + tool = "opencode"
Defensive patterns
Strategy: validation
Validate before calling
// ensure tool config resolves before invoking
let tool = std::env::var("FLOW_AGENT_TOOL").unwrap_or_default();
if !matches!(tool.as_str(), "claude" | "opencode")
&& which::which("gen").is_err() && std::env::var("GEN_REPO").is_err() {
eprintln!("tool={tool} requires gen; install gen or set GEN_REPO");
} Try / catch
match run_agent(name, prompt) {
Err(e) if e.to_string().contains("gen not found") => {
eprintln!("install gen or set GEN_REPO, or configure tool=claude|opencode");
}
r => r?,
} Prevention
- Set agent tool explicitly to "claude" or "opencode" in config to avoid the gen fallback.
- Install gen wherever the tool value is gen/custom.
- Verify config after machine migrations (GEN_REPO path changes).
When it happens
Trigger: Invoking an agent whose configured tool string (from get_agent_config) is not "claude" or "opencode", while the gen binary/repo cannot be located.
Common situations: Config file setting tool to "gen" or a custom value on a machine without the gen repo; GEN_REPO unset after a machine migration; typo'd tool name in config silently falling through to the gen branch.
Related errors
- Missing profile file: {}
- Selection out of range.
- No prompt provided.
- handled before project context load
- gen agent list failed
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/628080d93f02a345.
Report an issue: GitHub.