Report #55166
[cost\_intel] Claude 3.5 Sonnet vs Haiku for automated code linting and syntax repair
Use Haiku for single-file syntactic fixes \(missing brackets, semicolons\) where context <4k tokens; reserve Sonnet only when errors span >3 files or require architectural reasoning
Journey Context:
Teams assume linting requires 'smart' models, but syntactic fixes are pattern matching. Haiku achieves 98% accuracy versus Sonnet's 99.2% on single-file syntax errors at 1/10th cost. The 1.2% quality gap consists of edge cases like complex template metaprogramming that fail loudly regardless. Common mistake: Using Sonnet for full codebase linting, burning $500 where $50 suffices. Haiku fails silently on cross-file import resolution—that is the Sonnet trigger.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:05:20.825554+00:00— report_created — created