"Type errors cost our coding agents under one percent of their time." With that claim, Evil Martians challenged the widespread belief that strict types dramatically boost AI coding quality. The logic sounded airtight: a compiler catches bad arguments immediately, so valid patches go up. GitHub Octoverse 2025, Hugging Face's Thomas Wolf, Matt Pocock, and Simon Willison all cited that idea.
Irina Nazarova and Vladimir Dementyev at Evil Martians tested the hypothesis on real session logs. The results were sobering.
Where the Belief Came From and What a Benchmark Audit Revealed
Debates often cite a PLDI 2025 paper reporting that 94% of LLM compilation errors are type errors. That sounds dramatic, yet the paper only measured error breakdowns inside already-typed code—not whether a coding agent actually solves more tasks with types.
Evil Martians gathered three datasets: public open-source benchmarks (SWE-bench Multilingual, SWE-bench Verified, Multi-SWE-bench, and SWE-PolyBench), 24 head-to-head runs on Ruby on Rails vs. Rust, and 104 controlled runs on 37signals' Rails app Fizzy.
The first surprise surfaced when auditing benchmark labels. Out of 823 JS and TS tasks, 472 reference patches modified code of the opposite type! Preact and Svelte were tagged as "JavaScript" even though they type-check (typed Svelte made up 269 of 356 JS tasks in Multi-SWE-bench). Meanwhile, Material UI was labeled "TypeScript" even though dozens of its fixes edited plain JS files.
Once the team relabeled tasks and equalized difficulty, the neat theory fell apart.
Solved task rate after relabeling: TypeScript vs. plain JS
Plain JavaScript never trailed TypeScript, and inside Material UI both languages tied. Across 10 languages at equal patch difficulty, statically typed and dynamic languages clustered around 65% (Python hit 67% without a type checker in Django). The sharpest gap appeared inside typed languages themselves: Rust scored 72%, while Go scored 53%.
Why Type Errors Take Less Than 1% of Agent Time
Maybe agents just aren't running the compiler? Exactly. In SWE-bench Multilingual, CLI agents invoked tsc in only 19 of 195 TS runs, whereas they ran tests in 68% of sessions.
Evil Martians wired the typescript-lsp plugin into Claude Code with Opus 5.5 so LSP diagnostics would highlight type errors on every edit. Yet in 70 of 75 runs, the agent bypassed the Edit tool via bash (sed -i and Python one-liners) and never saw the hints. When they blocked shell edits with a PreToolUse hook, the agent hit 184 type errors across 23 of 39 TS runs—and median solve rates dropped from 92% without the plugin to 85% with the plugin and 77% with the hook.
Timing all 24 Rails vs. Rust runs explained why. Out of 101 Ruby steps mentioning type errors, only 16 were genuine, and fixing them took under 1% of total time (0.5% in Ruby, 1% in a greenfield Rust project). One GPT-6 Luna run spent 13 minutes verifying UI in a browser—more than every type error across all 12 Rails runs combined. Not a single session failed because of types; failures came from logic bugs, race conditions, and authorization.
Tests and verification ate the lion's share of time (30–55%), followed by reading code (14–44%). When AGENTS.md on Fizzy strictly mandated running a type checker, accuracy barely budged: 58% for plain Ruby vs. 61% for RBS with Steep and 57% for Sorbet with Tapioca. Meanwhile, type checkers burned 20–28% of session time, caught zero bugs beyond tests, and models like DeepSeek V4.1 Flash spent half an hour fighting errors only to silence them with untyped.
Does That Mean We Don't Need TypeScript Anymore?
Wait—should you rip out types and go back to raw JS? Of course not. The experiment tested one specific question: whether static typing speeds up AI coding agents in late 2026. For humans, IDE autocomplete, and safe refactoring, TypeScript remains as valuable as ever.
However, migrating a legacy JS or Ruby codebase to strict types just to help AI agents doesn't pay off right now: solve rates don't climb, while runtimes and token bills often do. The authors openly note their sample limits (24 Rails/Rust runs, 25 JS/TS tasks after relabeling SWE-bench Multilingual) and point out that future agent harnesses may integrate LSP feedback much better.
Invest in fast automated tests and concise, readable code: verification and repo reading consume most of an agent's time. If you want types to help the model too, document a fast incremental check in AGENTS.md or hook diagnostics into file edits, and ban any and @ts-ignore in your linter.


