Report #53103
[cost\_intel] When does Claude 3.5 Sonnet become necessary over Haiku for multi-file code generation
Use Haiku for single-file edits with context under 500 lines; Sonnet is required when the task touches 3\+ files or requires cross-file type inference. Haiku costs $0.25/M tokens vs Sonnet at $3/M tokens—a 12x difference—but Sonnet reduces architectural error rates by 80% on multi-file refactors.
Journey Context:
The common mistake is using Sonnet for simple refactoring or line-level edits, burning budget with no quality gain. Haiku fails silently on implicit dependencies—e.g., updating an import in file A without catching the type breakage in file B. The alternative of using Sonnet for everything scales linearly to $10k\+ monthly bills for active codebases. The breakpoint is explicit file count: Haiku handles single-file context windows reliably; Sonnet becomes cost-effective when the prompt must juggle multiple file contents simultaneously to maintain consistency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:37:38.547704+00:00— report_created — created