nikivdev/code · error
No tasks specified. Usage: f parallel 'echo hello' 'echo wor
Error message
No tasks specified. Usage: f parallel 'echo hello' 'echo world' or 'label:command'
What it means
The `f parallel` CLI entry point checks cmd.tasks before parsing labels. An empty argument list cannot mean anything useful, so it bails with a usage hint embedded in the message.
Source
Thrown at src/parallel.rs:452
.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`.
pub fn run(cmd: crate::cli::ParallelCommand) -> Result<()> {
use tokio::runtime::Runtime;
if cmd.tasks.is_empty() {
bail!("No tasks specified. Usage: f parallel 'echo hello' 'echo world' or 'label:command'");
}
// Parse tasks: either "label:command" or just "command" (auto-labeled)
let tasks: Vec<(String, String)> = cmd
.tasks
.iter()
.enumerate()
.map(|(i, t)| {
if let Some((label, command)) = t.split_once(':') {
(label.to_string(), command.to_string())
} else {
// Auto-generate label from command or use index
let label = t
.split_whitespace()
.next()
.unwrap_or(&format!("task{}", i + 1))
.to_string();
(label, t.to_string())View on GitHub (pinned to a747e741ae)
Solutions
- Pass at least one task: f parallel 'echo hello' 'echo world'.
- Use label:command syntax for named tasks: f parallel build:cargo build.
- In scripts, guard against empty argument arrays before invoking f parallel.
Example fix
// before $ f parallel // No tasks specified. Usage: ... // after $ f parallel 'lint:npm run lint' 'test:npm test'
Defensive patterns
Strategy: validation
Validate before calling
if [ ${#TASKS[@]} -eq 0 ]; then
echo "usage: f parallel 'cmd1' 'label:cmd2'" >&2
exit 1
fi
f parallel "${TASKS[@]}" Prevention
- Always quote each task argument so spaces survive shell splitting.
- In scripts, build the argument array and bail if it is empty before invoking f parallel.
- Use label:command form to keep output attributable to tasks.
When it happens
Trigger: Running `f parallel` with no quoted task arguments, or `f parallel ""` where parsing yields no tasks.
Common situations: Shell scripts building the command from an empty array (word-splitting drops all args); forgetting to quote commands containing spaces so the shell mangles them.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- No prompt provided. Usage: f agents run {} "your prompt here
- missing prompt. Usage: f ai everruns "your prompt"
- Usage: f migrate <target> OR f migrate <source> <target> OR
- No command specified
- pass either a subcommand or a bare import path, not both
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/fc0d2910b434da16.
Report an issue: GitHub.