{"record":{"id":"d07e479791f8968d","repo":"zed-industries/zed","slug":"no-marker-bounded-edit-codeblocks-found-in-model-r","errorCode":null,"errorMessage":"no marker-bounded edit codeblocks found in model response","messagePattern":"no marker-bounded edit codeblocks found in model response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/format_prompt.rs","lineNumber":430,"sourceCode":"        if response.trim().ends_with(Self::NO_EDITS) {\n            return Ok(no_edits);\n        }\n\n        let prompt_inputs = example\n            .prompt_inputs\n            .as_ref()\n            .context(\"example is missing prompt inputs\")?;\n\n        // The teacher emits reasoning plus a sequence of markdown code fences,\n        // one per edit, each a marker-bounded span. Extract the spans from the\n        // fences, then hand off to the shared hash-region patch assembler that\n        // the student parser also uses.\n        let codeblocks: Vec<String> = extract_all_codeblocks(response)\n            .into_iter()\n            .filter(|block| block.contains(hashed_regions::MARKER_TAG_PREFIX))\n            .collect();\n        if codeblocks.is_empty() {\n            return Err(anyhow!(\n                \"no marker-bounded edit codeblocks found in model response\"\n            ));\n        }\n\n        let mut spans = Vec::with_capacity(codeblocks.len());\n        for codeblock in &codeblocks {\n            spans.push(hashed_regions::extract_marker_span(codeblock)?);\n        }\n\n        let (patch, cursor) = hashed_regions::build_patch_from_spans(\n            prompt_inputs,\n            &spans,\n            Self::USER_CURSOR_MARKER,\n        )?;\n\n        let actual_cursor = cursor.map(|cursor| {\n            ActualCursor::from_editable_region(\n                &cursor.path,","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/format_prompt.rs#L412-L448","documentation":"The teacher-example parser scanned the model response for marker-bounded markdown code fences (after ruling out the NO_EDITS sentinel) and found none; the expected edit spans are absent, so the response cannot be parsed into edits.","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/format_prompt.rs:430 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the raw model response — it likely emitted prose or malformed fences instead of marker-bounded edits","Regenerate or re-prompt the teacher model to produce properly fenced edits"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}