Agent-facing compiler diagnostics for typed repair loops
Compiler and type-checker teams should add an agent-facing diagnostic mode that emits the full repair context to coding agents while keeping the existing concise messages for developers. The Type-Error Ablation study tested this directly in Shplait: 2,400 qwen2.5-coder:14b repair trials compared full unification-stack output, proximate error location, minimal type errors, and untyped test-suite feedback. Richer typed diagnostics improved repair behavior, and 97.9% of repairs that removed the type error also passed the semantic tests.
A cheap pilot is a feature flag in a typed language server or CI repair harness. When an agent is the consumer, the tool can include full constraint traces, inferred types, candidate origin sites, and failing test summaries in a structured artifact. The team can replay recent type failures through the current diagnostic mode and the agent-facing mode, then compare fix rate, semantic-test pass rate, and number of edit attempts. This is a concrete toolchain change for teams already letting agents read compiler output and patch code.