zed-industries/zed · error
prompt_inputs missing (run context retrieval first)
Error message
prompt_inputs missing (run context retrieval first)
What it means
Bailed by the repair step when the example has no `prompt_inputs`, which are produced by the context-retrieval step. Repair builds a teacher-correction prompt from the retrieved context, so it refuses to run on examples that skipped context retrieval. This is the same ordering guard as in the QA step, enforced before any model call.
Source
Thrown at crates/edit_prediction_cli/src/repair.rs:294
/// - Turn 3 (User): Repair critique and instructions
/// - Turn 4 (Assistant): Improved prediction (the response we parse)
pub async fn run_repair(
example: &mut Example,
args: &RepairArgs,
example_progress: &ExampleProgress,
) -> Result<()> {
if has_successful_repair(example) {
return Ok(());
}
if !needs_repair(example, args.confidence_threshold) {
return Ok(());
}
run_parse_output(example).context("Failed to execute run_parse_output")?;
if example.prompt_inputs.is_none() {
anyhow::bail!("prompt_inputs missing (run context retrieval first)");
}
if example.predictions.is_empty() {
anyhow::bail!("no predictions available (run predict first)");
}
let teacher_prompt = example
.prompt
.as_ref()
.context("prompt missing (run format_prompt first)")?;
let teacher_response = &example.predictions[0].actual_output;
if teacher_response.is_empty() {
anyhow::bail!("teacher response is empty (run predict first)");
}
let step_progress = example_progress.start(Step::Repair);
View on GitHub (pinned to f4178619ac)
Solutions
- Run context retrieval for the examples before the repair step
- Verify `prompt_inputs` is populated in the intermediate JSONL
- Fix any context-retrieval failure first, since repair cannot proceed without it
Defensive patterns
Strategy: validation
Validate before calling
if example.prompt_inputs.is_none() {
// run the context-retrieval step before repair
anyhow::bail!("cannot run repair: run context retrieval first");
} Try / catch
Catch per example, log the example id with the message, and continue the batch so only unprepared examples fail.
Prevention
- Check prompt_inputs presence before invoking repair on each example
- Keep stage outputs in one append-only file so ordering is implicit
- Smoke-test the full pipeline on a few examples before a large batch
When it happens
Trigger: Invoking `ep repair` on examples where `prompt_inputs` is null: context retrieval never ran, failed, or the output file predates that stage of the pipeline.
Common situations: Resuming a batch from a partial run; reordering pipeline subcommands in a driver script; upstream retrieval failures silently skipped.
Related errors
- prompt_inputs missing (run context retrieval first)
- no predictions available (run predict first)
- --languages and/or --extensions is required (use --list to s
- unknown teacher backend `{s}`. Valid options: sonnet45, sonn
- unknown provider `{provider}`. Valid options: mercury, zeta1
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/68f99e9e862c1815.
Report an issue: GitHub.