{"slug": "type-errors-cost-our-coding-agents-under-1-of-their-time", "title": "Type errors cost our coding agents under 1% of their time", "summary": "Evil Martians' benchmark of coding agents found that type errors consumed under 1% of agent time, and that typed and dynamic languages solved tasks at roughly the same rate — about 65% each across ten languages, with Python at 67%. In 104 runs of one Rails app, agents told to type-check with Sorbet or RBS solved 57% to 61% of tasks versus 58% for plain Ruby, while the type tools consumed 20% to 28% of their time; agents ran tsc in only 1 of 10 TypeScript runs. The results challenge claims from GitHub's Octoverse 2025, Hugging Face co-founder Thomas Wolf and Django co-creator Simon Willison that static typing improves agentic coding.", "body_md": "# Type errors cost our coding agents under 1% of their time\n\n“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](https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/) credits AI with pushing TypeScript to #1, because “type systems reduce ambiguity and catch LLM errors before production.” [Thomas Wolf](https://x.com/Thom_Wolf/status/2023387043967959138), co-founder of Hugging Face, expects AI to “favor strongly typed, formally verifiable and/or high performance languages.” [Simon Willison](https://simonwillison.net/2026/Feb/18/typing/), co-creator of Django, “may finally be coming around to preferring type hints or even strong typing.”\n\nAt 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](https://rubyonrails.org/ai) 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.\n\n- **Typed and dynamic languages tie.** Across ten languages, at the same task difficulty, typed and dynamic both solve about 65%, and Python 67%.\n- **TypeScript didn’t beat plain JavaScript** in any of three public benchmarks, once we fixed their labels.\n- **Agents barely touch the type checker.** They ran`tsc` in 1 TypeScript run out of 10. With Claude Code’s language server plugin installed, they edited right around it.\n- **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.\n- **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.\n\nEvery run and script is public, so you can check our work. If you write TypeScript, skip to [the rabbit hole](#typescript-vs-javascript-is-a-rabbit-hole). The methods and the finer detail are in the [appendix](#appendix-methods-and-details).\n\n## \n\nSo 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?\n\nThe number everyone quotes, including [GitHub’s own explainer](https://github.blog/ai-and-ml/llms/why-ai-is-pushing-developers-toward-typed-languages), is “94% of LLM-generated compilation errors were type-check failures.” That comes from [a PLDI 2025 paper](https://arxiv.org/abs/2504.09246) 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.\n\nSomewhere between the paper and the search summary, “most compile errors in typed code are type errors” turned into “types help agents.”\n\nHowever, the only head-to-head test we found points the other way. [Yusuke Endoh](https://dev.to/mame/which-programming-language-is-best-for-claude-code-508a), 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.\n\n## \n\nLarger scale means real issues in mature open source projects. [SWE-bench Multilingual](https://huggingface.co/datasets/SWE-bench/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](https://github.com/SWE-agent/mini-swe-agent), in February 2026. This leaves out Python, so we added its Python counterpart, [SWE-bench Verified](https://huggingface.co/datasets/SWE-bench/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.\n\nAt 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%.\n\nThe 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](#appendix-methods-and-details).\n\n## \n\nHere comes the comparison everyone cares about. “AI agents use TS’s type errors as an extra feedback loop,” [Matt Pocock](https://x.com/mattpocockuk/status/1917198388736528402), 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.\n\n#### \n\nA 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:\n\n| Benchmark | Label | Tasks | Fix matches the label | Fix edits both | Fix is the other kind | \n|---|---|---|---|---|---|\n| [SWE-bench Multilingual](https://huggingface.co/datasets/SWE-bench/SWE-bench_Multilingual) | “JavaScript” | 28 | 11 | 0 | 17 (Preact, type-checked) | \n|  | “TypeScript” | 15 | 14 | 0 | 1 | \n| [Multi-SWE-bench](https://github.com/multi-swe-bench/experiments) | “JavaScript” | 356 | 74 | 10 | 272 (269 Svelte, type-checked) | \n|  | “TypeScript” | 224 | 78 | 68 | 78 (Material UI, plain JavaScript) | \n| [SWE-PolyBench](https://github.com/amazon-science/SWE-PolyBench) Verified | “JavaScript” | 100 | 52 | 2 | 46 (42 Svelte TypeScript, 4 Prettier) | \n|  | “TypeScript” | 100 | 30 | 12 | 58 (55 Material UI, plain JavaScript) | \n| **All three** |  | **823** | **259** | **92** | 472 | \n\n#### \n\nThe 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.\n\n#### \n\nSo 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.\n\n| Benchmark | TypeScript fixes solved | Plain JavaScript fixes solved | Difference (95% interval) | Setups where TypeScript led | \n|---|---|---|---|---|\n| SWE-bench Multilingual, 13 models | 60% (13 tasks) | 62% (12 tasks) | −2 points (−21 to +19) | 5 of 13 | \n| Multi-SWE-bench, 36 setups | 5% (79 tasks) | 8% (152 tasks) | **−4 points (−7 to −1)** | 3 of 36 | \n| 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 | \n| SWE-PolyBench, 8 submissions | 48% (72 tasks) | 54% (110 tasks) | −6 points (−15 to +3) | 4 of 8 | \n\n#### \n\nThe 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.\n\nThis 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](https://code.claude.com/docs/en/plugins/code-intelligence), which runs `typescript-language-server` and hands the agent its errors.\n\n#### `tsc`, and no type errors\n\nWith 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](https://github.com/anthropics/claude-code/issues/80267), closed without a fix), so it never reported a thing. The agent ran `tsc` in 7 runs.\n\n#### \n\nA `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.\n\nEven 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.\n\n#### \n\nNo. We ran every task three times in each setup. Here’s the median share of runs solved, ± its standard error:\n\n|  | No plugin | Plugin | Hook | Plugin and hook | \n|---|---|---|---|---|\n| TypeScript, 13 tasks | 92% ± 0 | 85% ± 3 | 92% ± 0 | 77% ± 3 | \n| Plain JavaScript, 12 tasks | 75% ± 3 | 75% ± 3 | 75% ± 3 | 75% ± 0 | \n| TypeScript runs that ran `tsc` | 5 of 39 | 7 of 39 | 8 of 39 | 3 of 39 | \n| TypeScript runs shown a type error | 0 of 39 | 0 of 39 | 1 of 39 | 23 of 39 | \n\nSeeing 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.\n\nAn unused plugin still changed how the agent worked.\n\nAnother 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.\n\n## \n\nBenchmarks only report pass or fail. In our own runs, we could read every step. My colleague [Vladimir Dementyev](https://evilmartians.com/martians/vladimir-dementyev) [ran two tasks from our Agents on Rails suite on both Rails and Rust](https://evilmartians.com/chronicles/the-agents-on-rails-files-designing-black-box-evals-for-coding-agents#bonus-rewrite-it-in-rust-or-look-at-all-the-things-agents-arent-doing-with-rails): adding chat bots to [Campfire](https://github.com/basecamp/once-campfire), 37signals’ chat app, and to [its Rust port](https://github.com/basecamp/once-campfire-rust), 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.\n\nThe 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.\n\nHow 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.\n\nFixing those 16 errors took under 1% of the agents’ time. The worst run lost just under 2%.\n\nRust’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.\n\nStill, 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.\n\n### \n\nSo 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:\n\n- **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.\n- **Rust agents compiled about as long as they tested** on the greenfield app: 6 minutes per run each.\n- **Rails agents lost 9 minutes per run to plumbing** on the greenfield app, half of it in commands killed at the time limit.\n\n### \n\nRuby vs Rust changes everything at once. So Vladimir ran the clean experiment for [his SF Ruby Conference talk](https://evilmartians.com/events/vladimir-dementyev-sf-ruby-conference-2026): one app, 37signals’ [Fizzy](https://github.com/basecamp/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](https://github.com/ruby/rbs) with Steep, and [Sorbet](https://sorbet.org) with Tapioca. The app’s `AGENTS.md` named the type checker, and the agents listened: all 68 typed trials ended with a clean check.\n\n|  | Plain Ruby | RBS and Steep | Sorbet and Tapioca | \n|---|---|---|---|\n| Trials | 36 | 33 | 35 | \n| Solved | 58% | 61% | 57% | \n| Share of agent time in steps that ran type tools | none | 28% | 20% | \n| Agent time against plain, by model | 1× | 0.9 to 1.7× | 0.8 to 1.2× | \n| Type errors that caught a bug the tests didn’t | none | none | none | \n\nThe solve rate didn’t move. The bill did: type tools took 20% of agent time with Sorbet and 28% with RBS.\n\nAnd 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.\n\nEvery 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](#appendix-methods-and-details).\n\n## \n\nNot 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.\n\nWhat *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.\n\nSo 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.\n\n## \n\nWe 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.\n\nThe 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.\n\nThat’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.\n\n**Let’s run a Benchmarking Sprint for your team.** In two weeks, we build [custom agent benchmarks on your codebase](https://evilmartians.com/services/llm-benchmarking), 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](https://evilmartians.com/#contact).\n\n## \n\n## Do static types help AI coding agents?\n\nAs 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.\n\n## Is TypeScript better than JavaScript for coding agents?\n\n**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.\n\n## Do coding agents use the type checker?\n\n**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.\n\n## How do I make TypeScript types help a coding agent?\n\n**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.\n\n## What do coding agents spend their time on?\n\n**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.\n\n## \n\n## How we measured\n\n**Ruby vs Rust.** The tasks are [ms-campfire-bots](https://github.com/rails/ai-evals/tree/main/tasks/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`.\n\nThe 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.\n\nWe 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.\n\n**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.\n\n**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.\n\n## Ruby vs Rust: the error steps and how the runs ended\n\nOf 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.\n\n|  | Ruby on Rails | Rust | \n|---|---|---|\n| Greenfield app, 8 configurations: passed every required check | 6 of 8 | 4 of 8 | \n| Greenfield app: total model cost, including failed runs | $53 | $65 | \n| Campfire, 3 pairs with a valid result on both stacks: passed | 2 of 3 | 2 of 3 | \n| Campfire: agent time in those 3 pairs | 105 min | 256 min | \n| Campfire, 2 models that passed both: model cost | 1× | 2 to 3.6× | \n\nThese are small samples: one trial per configuration and stack.\n\n## Typed Ruby, task by task\n\nOn `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.\n\nThe 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.\n\n## SWE-bench Multilingual by fix size, and Python\n\nThe benchmark publishes no difficulty labels, so we used the size of the human fix: the lines its gold patch changes.\n\n| Size of the human fix | Typed tasks | Typed solved | Dynamic tasks | Dynamic solved | \n|---|---|---|---|---|\n| Small, up to 6 lines | 61 | 71% | 50 | 73% | \n| Medium, 7 to 18 lines | 57 | 71% | 38 | 72% | \n| Large, over 18 lines | 67 | 53% | 27 | 48% | \n| **At the same mix** | 185 | **65%** | 115 | **65%** | \n\nDynamic minus typed, the gaps and their 95% intervals are:\n\n- **Matched on fix size** : under a point (−8 to +6).\n- **Matched on fix size, files touched, and failing tests** : +2 points (−5 to +9).\n- **With [Preact](https://github.com/preactjs/preact) counted as typed** , since it type-checks its JavaScript: −2 points (−9 to +5).\n\nAfter 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.\n\nSWE-bench Multilingual leaves Python out by design. Its Python counterpart is [SWE-bench Verified](https://huggingface.co/datasets/SWE-bench/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.\n\n## JavaScript vs TypeScript: method and difficulty\n\nType-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.\n\nIn 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.\n\nWe compared the two in four steps:\n\n1. **Label each task by its fix.** TypeScript means the fix edits only`.ts` ,`.tsx` ,`.mts` , or`.cts` files. Plain JavaScript means it edits only JavaScript the repository doesn’t type-check: no`// @ts-check` at the top, and no`checkJs` in the nearest`tsconfig.json` or`jsconfig.json` that includes the file. Declaration files and non-code files don’t count.\n2. **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.\n3. **Hold difficulty fixed.** We compute both groups’ solve rates within each difficulty level, then weight the levels by their combined share.\n4. **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.\n\nThen 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.\n\nUnder the benchmarks’ own labels, each benchmark tilts its own way:\n\n- **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.\n- **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.\n- **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.\n\nRelabeling doesn’t even out the mixes: on Multi-SWE-bench, 10% of TypeScript-only tasks are hard, against 26% of plain JavaScript ones.\n\nPreact’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`.\n\nMulti-SWE-bench includes two unmerged runs, [PR #28](https://github.com/multi-swe-bench/experiments/pull/28) (AiWork.Code, Claude Opus 5.5) and [PR #29](https://github.com/multi-swe-bench/experiments/pull/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](https://github.com/amazon-science/SWE-PolyBench/pull/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.\n\nTwo 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](https://github.com/vuejs/core) and Material UI, its plain JavaScript mostly Material UI and [Day.js](https://github.com/iamkun/dayjs).\n\nThe 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.\n\n## How to check our work\n\nEvery 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](https://github.com/irinanazarova/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.\n\n**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](https://github.com/SWE-bench/experiments) at `40f164d`, the SWE-bench Multilingual dataset at `846e647`, [Multi-SWE-bench experiments](https://github.com/multi-swe-bench/experiments) at `6a7d556`, and the SWE-PolyBench submissions at `e7062f4`. With Python 3.12 or newer and Ruby:\n\n```\ncd static-typing/benchmarks\n./run.sh --boot 4000          # nine languages, typed vs dynamic\n./run_js_ts.sh --boot 4000    # JavaScript vs TypeScript, three benchmarks, by edited files\nruby same_difficulty.rb       # the same-difficulty tables in this post\n.venv/bin/python -I scripts/python_same_mix.py   # Python (Verified) at the same fix-size mix\n```\n\nBesides 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`](https://github.com/irinanazarova/coding-agents-myths/tree/main/static-typing/benchmarks/js_ts).\n\n**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:\n\n```\ncd static-typing/ruby-vs-rust\n./run.sh                      # checks the labels, classifies every step, writes results/\nruby ../charts/charts.rb      # redraws the charts in this post\n```\n\n**The typed Ruby experiment** is in [`static-typing/typed-ruby`](https://github.com/irinanazarova/coding-agents-myths/tree/main/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:\n\n```\ncd static-typing/typed-ruby\nruby summarize.rb             # writes results/summary.md\n```\n\n**The Claude Code runs** are in [`static-typing/claude-code-lsp`](https://github.com/irinanazarova/coding-agents-myths/tree/main/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:\n\n```\ncd static-typing/claude-code-lsp\nruby run_agent.rb --run full --conditions nolsp,lsp,nolsp-edit,lsp-edit --groups ts,plain\n./grade_parallel.sh full && ruby evaluate.rb --run full --no-grade\n```\n\n*The Go gopher on the cover is based on the [original design by Renee French](https://go.dev/blog/gopher), licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).*", "url": "https://wpnews.pro/news/type-errors-cost-our-coding-agents-under-1-of-their-time", "canonical_source": "https://evilmartians.com/chronicles/type-errors-cost-our-coding-agents-under-one-percent-of-their-time", "published_at": "2026-11-24 00:00:00+00:00", "updated_at": "2026-11-24 17:41:45.041614+00:00", "lang": "en", "topics": ["ai-agents", "ai-research", "developer-tools", "large-language-models"], "entities": ["Evil Martians", "GitHub", "Thomas Wolf", "Hugging Face", "Simon Willison", "Ruby on Rails", "TypeScript", "Sorbet"], "also_reported_by": [], "takeaway": "Across 104 Rails runs, agents told to type-check with Sorbet or RBS solved 57% to 61% of tasks versus 58% for plain Ruby, while the type tools consumed 20% to 28% of their time and type errors cost under 1% of agent time.", "recommendation": {"advice": "Don't mandate type-checking in coding-agent workflows on the assumption it lifts solve rates; in the source's 104 Rails runs it added no tasks solved and consumed 20% to 28% of agent time.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/type-errors-cost-our-coding-agents-under-1-of-their-time", "markdown": "https://wpnews.pro/news/type-errors-cost-our-coding-agents-under-1-of-their-time.md", "text": "https://wpnews.pro/news/type-errors-cost-our-coding-agents-under-1-of-their-time.txt", "jsonld": "https://wpnews.pro/news/type-errors-cost-our-coding-agents-under-1-of-their-time.jsonld"}}