Type errors cost our coding agents under 1% of their time
“Static types make coding agents better.” That’s the common view, and some of the most trusted names in software repeat it. GitHub’s Octoverse 2025 credits AI with pushing TypeScript to #1, because “type systems reduce ambiguity and catch LLM errors before production.” Thomas Wolf, co-founder of Hugging Face, expects AI to “favor strongly typed, formally verifiable and/or high performance languages.” Simon Willison, co-creator of Django, “may finally be coming around to preferring type hints or even strong typing.”
At Evil Martians, we have a hot take: every claim about agentic coding needs to be verified with data. We built the official coding agent benchmark for the Ruby on Rails framework, so we decided to test this claim about static types, too. So, we checked public benchmarks of real repository issues in ten languages: TypeScript, JavaScript, Python, Ruby, PHP, Go, Rust, Java, C, and C++. We added 24 of our own agent runs on Ruby on Rails and Rust, and 104 runs of one Rails app in plain Ruby, with RBS, and with Sorbet. Here’s what we found.
- Typed and dynamic languages tie. Across ten languages, at the same task difficulty, typed and dynamic both solve about 65%, and Python 67%.
- TypeScript didn’t beat plain JavaScript in any of three public benchmarks, once we fixed their labels.
- Agents barely touch the type checker. They ran
tscin 1 TypeScript run out of 10. With Claude Code’s language server plugin installed, they edited right around it. - Type errors cost our agents under 1% of their time. One agent spent 13 minutes on a single browser check, more than all the Ruby type errors in twelve Rails runs combined.
- Told to type-check, agents did so, and solved no more tasks. With Sorbet or RBS: 57% to 61%. Plain Ruby: 58%. The type tools ate 20% to 28% of their time.
Every run and script is public, so you can check our work. If you write TypeScript, skip to the rabbit hole. The methods and the finer detail are in the appendix.
The most-quoted evidence answers a different question
So why is everyone so certain? The theory sounds right: a compiler flags a misspelled method in seconds, before a single test runs. But has anyone actually measured it on coding agents?
The common view, in Google’s AI Overview on November 12, 2026.
The number everyone quotes, including GitHub’s own explainer, is “94% of LLM-generated compilation errors were type-check failures.” That comes from a PLDI 2025 paper about constraining code generation with a type checker. It tells you which errors break a typed build. But it says nothing about whether agents finish more tasks with types.
Somewhere between the paper and the search summary, “most compile errors in typed code are type errors” turned into “types help agents.”
However, the only head-to-head test we found points the other way. Yusuke Endoh, a Ruby core committer, had Claude Code build a small Git clone in 15 language setups, with 600 runs in all: “statically typed languages were 1.4–2.6× slower and more expensive.” His own caveat was that the task is small, and “static typing should shine at larger scales.” So, we went looking at larger scales.
Across ten languages, typed and dynamic tie
Larger scale means real issues in mature open source projects. SWE-bench Multilingual has 300 of them, from 41 repositories in nine languages, and 13 models ran it with the same agent, mini-SWE-agent, in February 2026. This leaves out Python, so we added its Python counterpart, SWE-bench Verified: 500 tasks, run the same month by 11 of the same models with the same agent. We split the results by language.
At first glance, dynamic languages win: 67% solved against 65%, and Python looks best of all at 71%. Then you notice the task mix. Typed languages got more of the big fixes, 36% of their tasks against 23%, and half of Python’s fixes are 6 lines or fewer. Compared at the same difficulty, typed and dynamic both end up at about 65%, with Python at 67%.
The real spread is inside the typed group: Rust at 72%, Go at 53%. Typing isn’t what separates them. And the Python near the top is mostly untyped: Django, with 231 of the 500 tasks, runs no type checker. The level-by-level numbers are in the appendix.
TypeScript vs JavaScript is a rabbit hole
Here comes the comparison everyone cares about. “AI agents use TS’s type errors as an extra feedback loop,” Matt Pocock, author of Total TypeScript, wrote in 2025. “Please, don’t use .js for anything.” Three benchmarks publish per-task results for both languages, so we dug in. Here’s how deep it goes.
The benchmarks mislabel the code
A task’s label is its repository’s language, and the fix often edits the other kind of code. Preact and Svelte type-check their JavaScript, so they’re “JavaScript” with types. Material UI is “TypeScript,” yet 78 of its 174 Multi-SWE-bench fixes edit only plain JavaScript files. We sorted all 823 tasks by what their reference fix edits. In 472, the fix edits the other kind of code than its label says:
| Benchmark | Label | Tasks | Fix matches the label | Fix edits both | Fix is the other kind |
|---|---|---|---|---|---|
| SWE-bench Multilingual | “JavaScript” | 28 | 11 | 0 | 17 (Preact, type-checked) |
| “TypeScript” | 15 | 14 | 0 | 1 | |
| Multi-SWE-bench | “JavaScript” | 356 | 74 | 10 | 272 (269 Svelte, type-checked) |
| “TypeScript” | 224 | 78 | 68 | 78 (Material UI, plain JavaScript) | |
| SWE-PolyBench Verified | “JavaScript” | 100 | 52 | 2 | 46 (42 Svelte TypeScript, 4 Prettier) |
| “TypeScript” | 100 | 30 | 12 | 58 (55 Material UI, plain JavaScript) | |
| All three | 823 | 259 | 92 | 472 |
“JavaScript” and “TypeScript” tasks aren’t the same tasks
The JavaScript and TypeScript tasks come from different projects, at different difficulty. On Multi-SWE-bench, annotators rate 68% of the “JavaScript” tasks hard, against 29% of the “TypeScript” ones. If you compare raw solve rates, you’re comparing projects and difficulty, not languages.
Fix both, and TypeScript still doesn’t win
So we relabeled every task by the files its fix edits and compared the two at the same difficulty. Plain JavaScript scored as well (or better) in all three benchmarks. Inside Material UI, the one repository with enough of both, they tie.
| Benchmark | TypeScript fixes solved | Plain JavaScript fixes solved | Difference (95% interval) | Setups where TypeScript led |
|---|---|---|---|---|
| SWE-bench Multilingual, 13 models | 60% (13 tasks) | 62% (12 tasks) | −2 points (−21 to +19) | 5 of 13 |
| Multi-SWE-bench, 36 setups | 5% (79 tasks) | 8% (152 tasks) | −4 points (−7 to −1) | 3 of 36 |
| Multi-SWE-bench, newest runs: Opus 5.5 and GLM-5.2 | 51% and 55% | 61% and 62% | −10 and −8 points | 0 of 2 |
| SWE-PolyBench, 8 submissions | 48% (72 tasks) | 54% (110 tasks) | −6 points (−15 to +3) | 4 of 8 |
But what if it’s the harness?
The agents behind these numbers had a bash shell and nothing else: no editor, no language server. They ran tsc in 1 TypeScript run in 10. Most teams don’t work like that. In Claude Code or Cursor, type errors can show up after every edit.
This meant we ran the 25 JavaScript and TypeScript tasks from SWE-bench Multilingual in Claude Code with Opus 5.5, with and without Anthropic’s typescript-lsp plugin, which runs typescript-language-server and hands the agent its errors.
Still no tsc, and no type errors
With the plugin installed, the agent edited files through the shell, with sed -i and inline Python, in 70 runs of 75. The plugin only sees edits made with Claude Code’s own Edit and Write tools (a known issue, closed without a fix), so it never reported a thing. The agent ran tsc in 7 runs.
Add a hook
A PreToolUse hook that rejects shell edits did the trick. Every run switched to the Edit tool, and the language server finally spoke up: 23 of the 39 TypeScript runs were shown type errors, 184 in all.
Even then, errors don’t arrive the moment they happen. The server checks in the background, and Claude Code hands the agent only new errors, and only the latest report per file, on its next step. Of 234 reports, the agent saw 66: half were replaced by a newer one first, and 51 came too late, after the agent’s last step. On first load, the server took about 9 seconds just to check the project.
Profit?
No. We ran every task three times in each setup. Here’s the median share of runs solved, ± its standard error:
| No plugin | Plugin | Hook | Plugin and hook | |
|---|---|---|---|---|
| TypeScript, 13 tasks | 92% ± 0 | 85% ± 3 | 92% ± 0 | 77% ± 3 |
| Plain JavaScript, 12 tasks | 75% ± 3 | 75% ± 3 | 75% ± 3 | 75% ± 0 |
TypeScript runs that ran tsc | 5 of 39 | 7 of 39 | 8 of 39 | 3 of 39 |
| TypeScript runs shown a type error | 0 of 39 | 0 of 39 | 1 of 39 | 23 of 39 |
Seeing type errors didn’t help. Installing the plugin hurt. Without the plugin, every run solved the same 12 TypeScript tasks. With it, runs lost one or two more, always from the same pair, yet those 9 failed runs saw no type errors and never called the plugin’s tool. In Babel, the agent wrote || null where the test wanted the value left missing. In Vue, it moved CSS out of a nested rule and left the comments behind.
An unused plugin still changed how the agent worked.
Another surprise: TypeScript beat plain JavaScript in every setup, 92% to 75% without a plugin, though the 13 models in the public results found these TypeScript tasks harder. The type checker can’t take credit: those runs saw no type errors. Types as documentation, or just different repositories? 25 tasks from 7 projects can’t tell. Inside Material UI, the same model leaned 17 points toward plain JavaScript.
Type errors cost Ruby agents under 1% of their time
Benchmarks only report pass or fail. In our own runs, we could read every step. My colleague Vladimir Dementyev ran two tasks from our Agents on Rails suite on both Rails and Rust: adding chat bots to Campfire, 37signals’ chat app, and to its Rust port, and building a greenfield app from scratch: a live quiz. Eight model setups did the greenfield app on both stacks and four did Campfire on both, 24 runs in all.
The stacks differ in more than types: the Rust port was written by an AI and has nearly 13 times the code, and the Rust sandbox had twice the CPU and memory. So this can’t rank Ruby against Rust. It shows where the time goes.
How much of it went to type errors? We hunted for every error a type checker could have caught (NoMethodError, NameError, ArgumentError, and friends) and read by hand all 101 steps whose output named one. Most came from throwaway scripts the agents wrote, tests failing on purpose, or false matches. Only 16 were real. In one, DeepSeek V4.1 Flash called answer_play_path where Rails had generated play_answer_path; a test caught it, and the next step fixed it.
Fixing those 16 errors took under 1% of the agents’ time. The worst run lost just under 2%.
Rust’s compiler caught real mistakes too: adding Role::Bot left a match non-exhaustive, and E0004 pointed straight at it. Rust agents spent under 1% of their greenfield time on compiler errors, and 3% on Campfire.
Still, no run on either stack failed because of a type error. Every failure was behavior: a missing requirement, a broken contract, a race, an authorization rule.
The rest went to reading code and checking work
So where did the time go? We sorted every step by what the agent was doing and averaged the minutes per run, with the same models on both stacks. Next to everything else, fixing type errors, in yellow, barely registers:
- Reading code was the biggest cost on the existing app: 15 minutes per Campfire run in Rails, 41 in the Rust port with 13 times the code.
- Rust agents compiled about as long as they tested on the greenfield app: 6 minutes per run each.
- Rails agents lost 9 minutes per run to plumbing on the greenfield app, half of it in commands killed at the time limit.
Told to type-check, Rails agents did, and solved no more tasks
Ruby vs Rust changes everything at once. So Vladimir ran the clean experiment for his SF Ruby Conference talk: one app, 37signals’ Fizzy, four feature requests from the Agents on Rails evals, four models (GPT-6.1 Sol, GPT-6 Luna, GLM-5.3 Flash, and DeepSeek V4.1 Flash), and three variants: plain Ruby, RBS with Steep, and Sorbet with Tapioca. The app’s AGENTS.md named the type checker, and the agents listened: all 68 typed trials ended with a clean check.
| Plain Ruby | RBS and Steep | Sorbet and Tapioca | |
|---|---|---|---|
| Trials | 36 | 33 | 35 |
| Solved | 58% | 61% | 57% |
| Share of agent time in steps that ran type tools | none | 28% | 20% |
| Agent time against plain, by model | 1× | 0.9 to 1.7× | 0.8 to 1.2× |
| Type errors that caught a bug the tests didn’t | none | none | none |
The solve rate didn’t move. The bill did: type tools took 20% of agent time with Sorbet and 28% with RBS.
And when the checker complained, agents mostly made it stop. It caught a few real slips, like a wrong argument count, but most of what it flagged wasn’t a bug, and agents cast errors away with #: as !nil or wrote untyped signatures. DeepSeek V4.1 Flash got 44 to 54 errors from its first steep check, fought them for 21 to 28 minutes, then wrote untyped until the check went green.
Every failed task came down to logic or design, the kind of bug a type checker can’t see. The task-by-task swings are in the appendix.
So, does typing matter for coding agents?
Not in any data we have. Typed languages didn’t help agents finish more tasks, and where speed and cost moved, they moved against types: Endoh’s typed languages ran 1.4–2.6× slower and costlier, and RBS slowed down three of four models. That’s as of November 2026.
What does matter is everything around the code. Our agents’ longest detours were browser drivers, asset paths, and framework setup. GPT-6 Luna spent almost 13 minutes on a single browser check, more than all the Ruby type errors in twelve Rails runs combined.
So choose languages and frameworks for what agents actually spend their time on: how much code they read to change a feature, how fast your tests run, and how much of the app comes ready-made. Typing isn’t on that list. Already on TypeScript or Sorbet? Keep it: nothing here says types hurt. Just don’t expect a migration to make your agents better.
Help your coding agents with custom evals
We started with a hot take: every claim about agentic coding needs to be verified with data. Types were one claim, and there will be more.
The answers don’t transfer, because every codebase and every agent harness fails in its own way. In our Claude Code run, the language server was installed, and the agent ignored it until a hook made it listen. No public benchmark or doc would have told us that. You only find out by running your agents on your own tasks and reading what they did.
That’s what a custom eval does: real tasks from your Git history, your agent and its tools, your tests as the grader. It shows where your agents fail, whether they use the tools you expect, and what a new model or setup actually buys you.
Let’s run a Benchmarking Sprint for your team. In two weeks, we build custom agent benchmarks on your codebase, using the method behind the Rails Foundation’s benchmark. You get the most cost-efficient models for your code, your agents’ real failure modes, and the hooks and tools that fix them. About to bet on a stack, a migration, or a model? Talk to us.
FAQ
Do static types help AI coding agents?
As of November 2026, not measurably. On the same Rails app, adding RBS or Sorbet left agents solving 57% to 61% of tasks, against 58% in plain Ruby, and the type checkers caught no bug the tests didn’t. On SWE-bench Multilingual, 13 models solved about 65% of both typed-language and dynamic-language tasks at the same mix of task difficulty. In our 24 Ruby vs Rust runs, type errors cost Ruby agents under 1% of their time, while Rust agents spent 1% to 3% resolving compiler errors.
Is TypeScript better than JavaScript for coding agents?
Not in any benchmark we could check, once each task is labeled by the code its fix edits and compared at the same difficulty. Tasks that edit only TypeScript files trail tasks that edit only plain JavaScript by 2 points on SWE-bench Multilingual, 4 on Multi-SWE-bench, and 6 on SWE-PolyBench. Inside Material UI, the one repository with enough of both, they tie across 38 setups. The benchmarks’ own language labels hide this: most of the “JavaScript” in two of them is Preact or Svelte, which type-check their JavaScript, and most of SWE-PolyBench’s “TypeScript” is Material UI’s plain JavaScript.
Do coding agents use the type checker?
Rarely on their own. When AGENTS.md named the type checker, all 68 typed Rails trials ended with a clean type check. Without that, agents ran tsc in 19 of 195 TypeScript runs on SWE-bench Multilingual, and ran the test suite in 68%. In Rust, every build type-checks anyway. Claude Code’s language server plugin reports type errors only for edits made with its Edit and Write tools, and in our sessions, Opus 5.5 edited through the shell instead.
How do I make TypeScript types help a coding agent?
Get the errors in front of the agent: a language server plugin in Claude Code, plus a hook that keeps the agent’s edits in the Edit tool, the editor’s diagnostics in Cursor, or at least the check named in AGENTS.md. Keep the check incremental so it takes seconds, block any, type assertions, non-null assertions, and @ts-ignore so agents can’t silence errors, turn on strict, and keep a fast test suite as the gate, since behavior bugs fail far more tasks than type errors.
What do coding agents spend their time on?
Mostly checking their work and reading code. Across our Ruby and Rust runs, verifying (tests, compiling, trying the app) took 30% to 55% of agent time, and reading project code took 14% to 44%. Fixing type or compiler errors took under 4% on every task and stack.
Appendix: methods and details
How we measured
Ruby vs Rust. The tasks are ms-campfire-bots and ms-greenfield-quizzy from the Agents on Rails evals, run in October 2026. Time shares come from the timestamps of agent steps: each step gets the time from launching its command to the agent’s next action, which covers running the command and the agent thinking about its output. Gaps over 30 minutes are left out as infrastructure stalls. Each task is a chain of feature requests, and each request is a separate agent session: 103 sessions across the 24 runs. The full list of models and reasoning settings is in the repository’s runs.csv.
The activity categories follow the taxonomy we use for the Agents on Rails runs, plus two Rust-only ones: compiling, and fixing borrow and lifetime errors. Rules assign each step a category from its command, its output, and its exit code; under 2% of the time fits none. To check the rules, a separate model labeled 60 steps, sampled in proportion to their time, without seeing the rules’ answers. It agreed on 63% of steps, and on 75% at the level of the five activities in the chart. Most disagreements are about commands that write a file and then run it, which the rules count as Verify and the blind labeler as Build. So read Build and Verify as accurate to several points, and the smaller categories as rough.
We counted a Ruby type error when a type checker would catch it and it actually raised, read by hand; errors that never raise, like a silently wrong nil, aren’t counted. Rust compiler errors are rustc diagnostics with an error code, like E0308, in the output of a cargo command; cargo tooling errors, like a missing rustfmt, don’t count.
Typed Ruby. The four Fizzy tasks are ft-card-reactions, ft-active-storage-tracking, ft-notification-bundle-window-overlap, and ft-board-publish-unpublish-public-boundary, run from October 25 to 28, 2026, with rbs 4.2, Steep 2.1, and rbs_rails 0.13 in one variant, and Sorbet 0.6 and Tapioca 0.20 in the other. “Steps that ran type tools” are the steps running Steep, Sorbet, or Tapioca, timed the same way as above. “Agent time against plain” is, for each model, the median over the four tasks of its median agent time in the variant divided by its median in plain Ruby. A solve is a trial that got the verifier’s full reward. Trials lost to provider outages aren’t counted.
Benchmarks. “At the same difficulty” means we computed each language’s solve rate within each difficulty level, then averaged the levels with the same weights for both sides: the share of each level among all the tasks being compared. Multi-SWE-bench and SWE-PolyBench label difficulty with human time-to-fix estimates in three levels: under 15 minutes, 15 minutes to an hour, and over an hour. SWE-bench Multilingual has no labels, so its levels are terciles of the gold patch’s changed lines. Intervals for SWE-bench Multilingual resample whole repositories. Under the benchmarks’ own labels, no repository has tasks in more than one language, so every comparison between languages is also a comparison between projects.
Ruby vs Rust: the error steps and how the runs ended
Of the 101 Ruby steps that matched a type-error pattern, 55 came from throwaway scripts (browser automation the agent wrote to click through its app, or a one-liner that edited a file and tripped over string interpolation), 11 were tests that failed on purpose (the agent wrote a test for a feature before building it, saw uninitialized constant Game, and then built Game), and 19 matched for other reasons, like a missing Python, a syntax error, or a gem’s source file that mentions NoMethodError. The remaining 16 are the real type errors. Counting type errors alone, all 24 runs together spent under 1% of their time on them: about half a percent for Ruby and 1% for Rust.
| Ruby on Rails | Rust | |
|---|---|---|
| Greenfield app, 8 configurations: passed every required check | 6 of 8 | 4 of 8 |
| Greenfield app: total model cost, including failed runs | $53 | $65 |
| Campfire, 3 pairs with a valid result on both stacks: passed | 2 of 3 | 2 of 3 |
| Campfire: agent time in those 3 pairs | 105 min | 256 min |
| Campfire, 2 models that passed both: model cost | 1× | 2 to 3.6× |
These are small samples: one trial per configuration and stack.
Typed Ruby, task by task
On active-storage-tracking, typed trials solved it 5 times in 18, and plain trials 0 in 9. The traces credit those solves to runtime check scripts and reading the code, and older plain trials solved it 2 times in 12, all by GPT-6.1 Sol. On notification-bundle, it went the other way: typed 6 in 16, plain 6 in 9. In all four of its typed trials there, and in three earlier plain ones, DeepSeek bundled notifications sent five hours apart into one digest; its two plain trials in the same batch got the windows right. With two attempts per model and variant, neither gap is large enough to tell cause from noise.
The type errors the checkers reported fell into five kinds: a nil that couldn’t happen, a column declared by a fresh migration but not yet in the signatures, the self type of a concern, gaps in the generated signatures for Rails’ own models, and the agent’s own slips, like a wrong argument count.
SWE-bench Multilingual by fix size, and Python
The benchmark publishes no difficulty labels, so we used the size of the human fix: the lines its gold patch changes.
| Size of the human fix | Typed tasks | Typed solved | Dynamic tasks | Dynamic solved |
|---|---|---|---|---|
| Small, up to 6 lines | 61 | 71% | 50 | 73% |
| Medium, 7 to 18 lines | 57 | 71% | 38 | 72% |
| Large, over 18 lines | 67 | 53% | 27 | 48% |
| At the same mix | 185 | 65% | 115 | 65% |
Dynamic minus typed, the gaps and their 95% intervals are:
- Matched on fix size: under a point (−8 to +6).
- Matched on fix size, files touched, and failing tests: +2 points (−5 to +9).
- With Preact counted as typed, since it type-checks its JavaScript: −2 points (−9 to +5).
After the same difficulty adjustment, dynamic-language tasks also took about 9% fewer agent steps and cost about 10% less, though both intervals include zero. Fix size is a rough proxy. Together with files touched, failing tests, and issue length, it explains about 10% of why some tasks are harder than others.
SWE-bench Multilingual leaves Python out by design. Its Python counterpart is SWE-bench Verified: 500 tasks from 12 repositories, run in the same month by 11 of the same models, with the same agent and the same limits. Raw, Python looks best: 71% solved, against 64% for typed and 67% for dynamic Multilingual tasks across those 11 models. At the same fix-size mix as the chart, Python solves 67%, against 65% for both typed and dynamic Multilingual tasks with the same 11 models. Adjusted for task difficulty with more proxies (fix size, files touched, failing tests, issue length), every group lands within about a point of what its tasks predict: Python +1 point, typed languages −1, dynamic −1. And this Python is mostly untyped: Django, with 231 of the 500 tasks, runs no type checker, and none of the 82 function definitions in its human fixes has a return type annotation. Verified was screened more strictly than Multilingual and is widely memorized by models, so treat it as a reference point only.
JavaScript vs TypeScript: method and difficulty
Type-checked JavaScript, compared at the same difficulty as the main table, solved 72% of 18 tasks on SWE-bench Multilingual (17 of them Preact), 4% of 271 on Multi-SWE-bench (Svelte), 77% and 74% in Multi-SWE-bench’s two newest runs, and 72% of 4 on SWE-PolyBench (Prettier). With one project per benchmark, it speaks for those projects more than for types.
In fairness, the strongest result for types comes from two unmerged October runs of Claude Opus 5.5 on SWE-PolyBench, which favor TypeScript by 10 and 13 points. Yet one of those agents, AiWork.Code, with the same model, favors plain JavaScript by 10 points on Multi-SWE-bench, and by 17 inside Material UI. When one agent swings more than 20 points between benchmarks under the same labels, the repositories matter more than the types.
We compared the two in four steps:
- Label each task by its fix. TypeScript means the fix edits only
.ts,.tsx,.mts, or.ctsfiles. Plain JavaScript means it edits only JavaScript the repository doesn’t type-check: no// @ts-checkat the top, and nocheckJsin the nearesttsconfig.jsonorjsconfig.jsonthat includes the file. Declaration files and non-code files don’t count. - Set the rest aside. Type-checked JavaScript is essentially one project per benchmark, so it gets its own column. Fixes that edit both typed and plain code are left out.
- Hold difficulty fixed. We compute both groups’ solve rates within each difficulty level, then weight the levels by their combined share.
- Keep each setup separate. Every model or agent gets its own gap. We report the mean, how many setups favor TypeScript, and a 95% interval from resampling tasks within each level.
Then we repeated the comparison inside the one repository with enough of both, with mixed fixes counted as TypeScript, and on fixes that span two or more files: +1 point (−2 to +3) on Multi-SWE-bench and under a point (−15 to +14) on SWE-PolyBench. No repository besides Material UI has more than five tasks on each side.
Under the benchmarks’ own labels, each benchmark tilts its own way:
- Multi-SWE-bench rates 68% of its “JavaScript” tasks hard (over an hour, by its annotators’ estimate) and 29% of its “TypeScript” ones. At the same difficulty, JavaScript leads in 28 of 36 setups.
- SWE-bench Multilingual’s largest third of fixes makes up 33% of “TypeScript” tasks and 18% of “JavaScript” ones; at the same size, JavaScript’s lead shrinks from 17 points to 9.
- SWE-PolyBench’s mixes are close (43% and 37% of tasks take under 15 minutes), so TypeScript keeps its lead in 6 of 8 submissions. Without Material UI’s plain JavaScript, JavaScript leads by 13 points.
Relabeling doesn’t even out the mixes: on Multi-SWE-bench, 10% of TypeScript-only tasks are hard, against 26% of plain JavaScript ones.
Preact’s jsconfig.json sets checkJs at all 17 of its task commits, but only 4 of those commits have a script that runs the compiler over its source; the other 13 rely on editors and on type tests for its .d.ts files. The solve rates in the main comparison table are weighted by the difficulty mix of the TypeScript-file and plain JavaScript tasks combined, so those two columns subtract to the gap. Rates and gaps are rounded to whole numbers separately, so a gap can differ from its two columns by a point. Prettier’s four type-checked tasks sit at one difficulty level, so its rate isn’t weighted. The 11 hardest SWE-bench Multilingual tasks are those solved by 6 or fewer of 13 models (TypeScript) or 5 or fewer (JavaScript); our notes on each are in js_ts/task_notes.csv.
Multi-SWE-bench includes two unmerged runs, PR #28 (AiWork.Code, Claude Opus 5.5) and PR #29 (CodeArts, GLM-5.2). Four of the eight SWE-PolyBench submissions are open pull requests, #40, #44, #46, and #47; the two Opus 5.5 runs that favor TypeScript are #46 (JamLabs Jitto Build) and #47 (AiWork.Code). AiWork.Code’s SWE-PolyBench run ships a memorization audit, memorization_audit.json in PR #47, and 21 of the 29 JavaScript and TypeScript solves it flags are plain JavaScript; count those as unsolved, and TypeScript leads by 25 points in that run. Its Multi-SWE-bench run, which favors plain JavaScript, ships no audit.
Two more checks from the main comparison. Only on Multi-SWE-bench does the gap clear the noise, and there the 36 merged setups are 2025 models, 35 of which solve under 10% of these tasks. Each side still mixes projects: Multi-SWE-bench’s TypeScript is mostly Vue and Material UI, its plain JavaScript mostly Material UI and Day.js.
The other checks agree. Counting mixed fixes as TypeScript leaves plain JavaScript ahead by 4 points on both Multi-SWE-bench and SWE-PolyBench. Fixes that span two or more files, where types carry information between them, tie.
How to check our work
Every number in this post can be checked, and we’d like you to try. Evil Martians publish all 24 Ruby vs Rust run histories, the typed Ruby experiment, and every script behind our analysis in coding-agents-myths, under the MIT license, and we’ll keep checking claims about coding agents there, one myth per folder. If you get a different answer, open an issue. And if you run your own version of the with-and-without-types experiment, on your stack and your tasks, we’d love to see the result.
The benchmark analysis downloads every input from its public source at a pinned revision and checks each file’s SHA-256 before reading it: SWE-bench/experiments at 40f164d, the SWE-bench Multilingual dataset at 846e647, Multi-SWE-bench experiments at 6a7d556, and the SWE-PolyBench submissions at e7062f4. With Python 3.12 or newer and Ruby:
cd static-typing/benchmarks
./run.sh --boot 4000 # nine languages, typed vs dynamic
./run_js_ts.sh --boot 4000 # JavaScript vs TypeScript, three benchmarks, by edited files
ruby same_difficulty.rb # the same-difficulty tables in this post
.venv/bin/python -I scripts/python_same_mix.py # Python (Verified) at the same fix-size mixBesides the headline tables, the results include each model’s split by language, the JavaScript vs TypeScript comparisons rerun with one repository left out at a time, per-task CSVs, and our notes on the hardest tasks: what each hidden test checks beyond the issue, and how the agents’ patches failed. The labels for all 823 tasks are in static-typing/benchmarks/js_ts.
The Ruby vs Rust runs are published in full: every agent step with its command and output, the patches, and the verifier logs for all 24 runs. Next to them are the classification rules, our hand labels for the 101 Ruby error steps, and the 60-step blind check. One script reruns it all, with no downloads:
cd static-typing/ruby-vs-rust
./run.sh # checks the labels, classifies every step, writes results/
ruby ../charts/charts.rb # redraws the charts in this postThe typed Ruby experiment is in static-typing/typed-ruby, published with Vladimir’s permission: the four Fizzy tasks with their plain, RBS, and Sorbet variants, the hidden checks, one row per trial, and his full write-up. One script recomputes the table in this post:
cd static-typing/typed-ruby
ruby summarize.rb # writes results/summary.mdThe Claude Code runs are in static-typing/claude-code-lsp: all 100 sessions with their transcripts, Claude Code’s debug logs with the language server traffic, the patches, and the grading reports, plus the hook and the scripts. Rerunning needs Docker and a Claude Code token:
cd static-typing/claude-code-lsp
ruby run_agent.rb --run full --conditions nolsp,lsp,nolsp-edit,lsp-edit --groups ts,plain
./grade_parallel.sh full && ruby evaluate.rb --run full --no-gradeThe Go gopher on the cover is based on the original design by Renee French, licensed under CC BY 4.0.