Skip to content

🐛 Retry without prompt hint doubles LLM cost for same failure #90

Description

@ajianaz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions