Description
The retry on parse failure in src/engine/llm.rs:210 doubles the LLM call without modifying the prompt. If repair_json_string can't fix the JSON, the same prompt will likely produce the same broken output.
Suggested Fix
Add a prompt hint on retry: "IMPORTANT: Return only valid JSON with properly escaped strings."
Discovered by
Cora self-review on v0.1.3..v0.1.4
Description
The retry on parse failure in
src/engine/llm.rs:210doubles the LLM call without modifying the prompt. Ifrepair_json_stringcan't fix the JSON, the same prompt will likely produce the same broken output.Suggested Fix
Add a prompt hint on retry: "IMPORTANT: Return only valid JSON with properly escaped strings."
Discovered by
Cora self-review on v0.1.3..v0.1.4