Report #104039
[counterintuitive] LLM-generated code is correct if it looks plausible
Always type-check, compile, lint, and run generated code in a sandbox with tests. Use grammar or type-constrained decoding where possible; never trust generated code without execution feedback, especially in unfamiliar languages or complex tasks.
Journey Context:
Mündler et al. found that even frontier models produce substantial compilation errors on complex code tasks—for example, 18–39% in Rust and 40–60% in OCaml or Haskell—and that syntax-only constraints leave most errors untouched; type constraints roughly halve errors but do not eliminate them. Plausible-looking code can silently introduce logic bugs, security issues, or API misuse. Execution feedback and static analysis are essential parts of the code-agent loop, not optional post-processing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T05:07:52.678321+00:00— report_created — created