nikivdev/code · error
missing prompt. Usage: f ai everruns "your prompt"
Error message
missing prompt. Usage: f ai everruns "your prompt"
What it means
Thrown by resolve_prompt() when no prompt arguments were given AND stdin is a terminal, meaning there is no piped input to read. Since `f ai everruns` requires a prompt either as an argument or via stdin pipe, running it interactively with no argument would block forever waiting for terminal stdin, so the tool bails with usage guidance instead.
Source
Thrown at src/ai_everruns.rs:98
"runtime_ms": runtime_ms,
"error": err.to_string(),
"error_class": classify_error_text(&err.to_string()),
})),
}
result
}
fn resolve_prompt(opts: &AiEverrunsOpts) -> Result<String> {
if !opts.prompt.is_empty() {
let joined = opts.prompt.join(" ").trim().to_string();
if joined.is_empty() {
bail!("prompt is empty");
};
return Ok(joined);
}
if io::stdin().is_terminal() {
bail!("missing prompt. Usage: f ai everruns \"your prompt\"");
}
let mut buf = String::new();
io::stdin()
.read_to_string(&mut buf)
.context("failed to read prompt from stdin")?;
let prompt = buf.trim().to_string();
if prompt.is_empty() {
bail!("prompt from stdin is empty");
}
Ok(prompt)
}
fn wait_for_completion(
api: &EverrunsApi,
seq_bridge: &SeqBridge,
session_id: &str,
input_message_id: &str,View on GitHub (pinned to a747e741ae)
Solutions
- Pass the prompt as an argument: f ai everruns "your prompt"
- Pipe the prompt via stdin: echo "your prompt" | f ai everruns
- If invoked from a script, ensure the script forwards its prompt argument through
- Read the usage hint in the message and supply one of the two accepted input forms
Example fix
// before f ai everruns # no args, interactive TTY // after echo "audit the everruns output" | f ai everruns // or f ai everruns "audit the everruns output"
Defensive patterns
Strategy: validation
Validate before calling
# shell: ensure one of the two accepted inputs is present if [ $# -eq 0 ] && ! [ -p /dev/stdin ]; then echo 'usage: f ai everruns "your prompt" (arg or stdin pipe)'; exit 1 fi f ai everruns "$@"
Try / catch
// caller-side arg check; no runtime catch needed
anyhow::ensure!(
!args.is_empty() || !std::io::stdin().is_terminal(),
"f ai everruns needs a prompt argument or piped stdin"
); Prevention
- Always pass a quoted prompt argument in interactive shells
- Pipe input when the prompt comes from another command's output
- In scripts, forward "$@" so the prompt argument isn't dropped by wrappers
- Remember the tool never reads prompts from an interactive TTY
When it happens
Trigger: Running `f ai everruns` with zero prompt arguments in an interactive terminal (io::stdin().is_terminal() == true), so neither the args path nor a piped-stdin path can supply a prompt.
Common situations: Forgetting to quote/pass the prompt when testing the command manually; running the bare command to 'see what it does'; copy-pasting a piped example without the pipe (`echo x |` dropped); aliases or wrappers that drop arguments.
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
- prompt is empty
- Usage: f migrate <target> OR f migrate <source> <target> OR
- plan body is empty
- No command specified
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/181e5dd1e72079ee.
Report an issue: GitHub.