{"record":{"id":"181e5dd1e72079ee","repo":"nikivdev/code","slug":"missing-prompt-usage-f-ai-everruns-your-prompt","errorCode":null,"errorMessage":"missing prompt. Usage: f ai everruns \"your prompt\"","messagePattern":"missing prompt\\. Usage: f ai everruns \"your prompt\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai_everruns.rs","lineNumber":98,"sourceCode":"            \"runtime_ms\": runtime_ms,\n            \"error\": err.to_string(),\n            \"error_class\": classify_error_text(&err.to_string()),\n        })),\n    }\n    result\n}\n\nfn resolve_prompt(opts: &AiEverrunsOpts) -> Result<String> {\n    if !opts.prompt.is_empty() {\n        let joined = opts.prompt.join(\" \").trim().to_string();\n        if joined.is_empty() {\n            bail!(\"prompt is empty\");\n        };\n        return Ok(joined);\n    }\n\n    if io::stdin().is_terminal() {\n        bail!(\"missing prompt. Usage: f ai everruns \\\"your prompt\\\"\");\n    }\n\n    let mut buf = String::new();\n    io::stdin()\n        .read_to_string(&mut buf)\n        .context(\"failed to read prompt from stdin\")?;\n    let prompt = buf.trim().to_string();\n    if prompt.is_empty() {\n        bail!(\"prompt from stdin is empty\");\n    }\n    Ok(prompt)\n}\n\nfn wait_for_completion(\n    api: &EverrunsApi,\n    seq_bridge: &SeqBridge,\n    session_id: &str,\n    input_message_id: &str,","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai_everruns.rs#L80-L116","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nf ai everruns          # no args, interactive TTY\n// after\necho \"audit the everruns output\" | f ai everruns\n// or\nf ai everruns \"audit the everruns output\"","handlingStrategy":"validation","validationCode":"# shell: ensure one of the two accepted inputs is present\nif [ $# -eq 0 ] && ! [ -p /dev/stdin ]; then\n  echo 'usage: f ai everruns \"your prompt\" (arg or stdin pipe)'; exit 1\nfi\nf ai everruns \"$@\"","typeGuard":null,"tryCatchPattern":"// caller-side arg check; no runtime catch needed\nanyhow::ensure!(\n    !args.is_empty() || !std::io::stdin().is_terminal(),\n    \"f ai everruns needs a prompt argument or piped stdin\"\n);","preventionTips":["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"],"tags":["prompt","usage","stdin","cli"],"backgroundTag":"missing-required-argument","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}