Do Static Types Help Coding Agents? Data Says No

Static types and coding agents compared across benchmarks and Rails runs

Do static types make coding agents better? A new analysis from the Rails consultancy Evil Martians finds no measurable benefit. In public benchmarks and its own runs, static types coding agents solved no more tasks than dynamic languages, and type errors ate under 1% of agent time. The popular belief, repeated by GitHub’s Octoverse 2025, Hugging Face co-founder Thomas Wolf and Django co-creator Simon Willison, hasn’t been backed by data, the team says.

Where the 94% figure comes from

A widely quoted number says 94% of LLM-generated compilation errors were type-check failures. It comes from a PLDI 2025 paper on constraining code generation and describes which errors break a typed build. It says nothing about whether agents finish more tasks with types.

The one head-to-head test the team found points the other way. Ruby core committer Yusuke Endoh had Claude Code build a small Git clone in 15 language setups over 600 runs. Statically typed languages were 1.4 to 2.6 times slower and more expensive, though he noted static typing might shine at larger scales.

Ten languages, one tie

To test larger scales, the team split results from SWE-bench Multilingual (300 issues from 41 repositories) and SWE-bench Verified (500 Python tasks) by language. Thirteen models ran the first using the same mini-SWE-agent setup in February 2026. Dynamic languages looked ahead at 67% against 65%, with Python at 71%. But typed languages got more big fixes, 36% of their tasks against 23%. At equal difficulty, both groups solve about 65%, and Python 67%.

The spread inside the typed group is wider: Rust at 72% and Go at 53%. Python’s high score is mostly untyped code, since Django makes up 231 of the 500 tasks and runs no type checker.

TypeScript against JavaScript

Three benchmarks publish per-task results for both. The labels mislead, though. Preact and Svelte type-check their JavaScript, and 78 of Material UI’s 174 Multi-SWE-bench fixes edit only plain JavaScript. Across 823 tasks, 472 fixes edit the other kind of code than the label says. The JavaScript and TypeScript tasks also differ in difficulty: annotators rated 68% of the JavaScript tasks hard against 29% of TypeScript ones. After relabeling by edited files and matching difficulty, plain JavaScript scored as well or better in all three benchmarks.

The agents behind the benchmark numbers only had a bash shell, and ran tsc in 1 TypeScript run out of 10. So the team ran 25 tasks in Claude Code with Opus 5.5, with and without Anthropic’s typescript-lsp plugin. The agent edited through the shell in 70 of 75 runs, and the plugin only sees edits made with Claude Code’s own Edit and Write tools, so it reported nothing. A PreToolUse hook forcing the Edit tool fixed that, and 23 of 39 TypeScript runs saw 184 type errors. Yet of 234 reports, the agent saw 66. Results didn’t improve, and the plugin cost one or two tasks.

Under 1% of the time

In Evil Martians’ own runs, 24 in total across Ruby on Rails and Rust, Vladimir Dementyev read every step. Of 101 steps naming an error a checker could catch, only 16 were real, and fixing them took under 1% of agent time, with the worst run losing just under 2%. Rust agents lost under 1% of greenfield time and 3% of Campfire time to compiler errors. No run failed on a type error. Every failure was behavioral, like a missing requirement or a race.

Reading code was the biggest cost on an existing app: 15 minutes per Campfire run in Rails and 41 in the Rust port, which has nearly 13 times the code.

Telling agents to type-check

On 37signals’ Fizzy app, four models tried four feature requests in plain Ruby, RBS with Steep, and Sorbet with Tapioca. When the AGENTS.md named the checker, all 68 typed trials ended clean. Solve rates stayed at 57% to 61% against 58% for plain Ruby, but type tools used 20% of agent time with Sorbet and 28% with RBS. Agents mostly silenced the checker, for example with casts or untyped signatures. DeepSeek V4.1 Flash faced 44 to 54 errors, fought them for 21 to 28 minutes, then wrote untyped code until the check passed.

What to choose instead

The team’s advice: pick languages and frameworks by how much code agents must read, how fast tests run and how much ships ready-made. Typing isn’t on that list. Teams already on TypeScript or Sorbet should keep it, but shouldn’t expect a migration to help agents. To get anything from types, surface errors to the agent through a language server plus a hook, an editor’s diagnostics or a check named in AGENTS.md, and block any, assertions and @ts-ignore. A fast test suite matters more. The results are as of November 2026 and don’t transfer between codebases, so the team recommends custom evals built from your own Git history.

Source: evilmartians.com

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.