nikivdev/code · error
No tasks specified
Error message
No tasks specified
What it means
run_parallel is the library-level parallel executor; it rejects an empty task vector up front. It mirrors the CLI guard in run but applies to direct programmatic callers.
Source
Thrown at src/parallel.rs:429
}
}
// Show cursor
print!("{}", SHOW_CURSOR);
let _ = io::stdout().flush();
self.first_failure_code.lock().await.unwrap_or(0)
}
}
/// Run tasks in parallel with pretty output.
pub async fn run_parallel(
tasks: Vec<(&str, &str)>,
max_jobs: usize,
fail_fast: bool,
) -> Result<()> {
if tasks.is_empty() {
bail!("No tasks specified");
}
let tasks: Vec<Task> = tasks
.into_iter()
.map(|(label, cmd)| Task::new(label, cmd))
.collect();
let runner = Arc::new(ParallelRunner::new(tasks, max_jobs, fail_fast));
let exit_code = runner.run().await;
if exit_code != 0 {
std::process::exit(exit_code);
}
Ok(())
}
/// CLI entry point for `f parallel`.View on GitHub (pinned to a747e741ae)
Solutions
- Ensure the tasks vector has at least one entry before calling run_parallel.
- If callers may produce empty lists, check tasks.is_empty() first and skip/short-circuit gracefully.
Example fix
// before
run_parallel(&[], 4, false).await?;
// after
let tasks = build_tasks();
if !tasks.is_empty() {
run_parallel(&tasks, 4, false).await?;
} Defensive patterns
Strategy: validation
Validate before calling
if tasks.is_empty() {
eprintln!("nothing to run; skipping run_parallel");
return Ok(());
}
run_parallel(&tasks, max_jobs, fail_fast).await?; Prevention
- Check task lists built from user input/filters for emptiness before executing.
- Make run_parallel callers responsible for the empty case at the call site.
- Log when a task builder yields zero tasks so silent no-ops are visible.
When it happens
Trigger: Calling run_parallel(vec![], max_jobs, fail_fast) — e.g. a caller that built its task list from an empty filter result.
Common situations: Programmatic use where the caller passes user input through without checking it produced at least one (label, command) pair.
Related errors
- No prompt provided. Usage: f agents run {} "your prompt here
- No prompt provided for flow agent.
- agent run requires a non-empty query
- empty resolver command for {}
- resolver {} returned empty output for {}
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/d1d750577347238f.
Report an issue: GitHub.