← BACK TO THE ARCHIVE
21 Oct 2026 // 11 MIN READ

One small change will save my AI coding agents hours of waiting each day

One small change will save my AI coding agents hours of waiting each day

I spend quite a lot of time getting AI to write code. It turns out the agents were also spending quite a lot of time waiting for TypeScript.

I've been so absorbed in AI that I've neglected some of the fundamentals of the software I'm building on. Between new models, agent workflows and the daily torrent of AI news, developments in the rest of the stack have slipped past me.

Having agents do so much of the coding makes that surprisingly easy. I'm thinking about what they're building and how to review it, while the tools they're using underneath become background noise. Including, apparently, the compiler they keep waiting for.

On our busiest measured day (today!), switching compiler could have removed roughly four hours of aggregate waiting across those agents. That's an estimate from recorded compiler runs and measured timings, rather than four hours already reclaimed from my day (bah!).

This started with a post about Vercel's tsc-ts experiment. It sent me down a rabbit hole and made me realise I still hadn't tried Microsoft's native TypeScript compiler on Inkie.

I am very late to this party. Microsoft released the native compiler as TypeScript 7 on 8 July 2026. I've only just put it into our everyday workflow, and I can't believe I didn't do this sooner.

It's the TypeScript compiler rewritten in Go. For our rollout, we're running a pinned build from @typescript/native-preview as tsgo, alongside our existing classic compiler. That's the package route we tested, rather than an upgrade of our application's TypeScript dependency to version 7.

Here's what changed on our actual application.

What does a compiler actually do?

A compiler translates the code we write into a form the computer can run. TypeScript also checks that the pieces fit together: whether a function gets the kind of value it expects, for example, or whether we're trying to use something that doesn't exist.

Here we're measuring that checking step. We use --noEmit, which asks it to check the code without producing JavaScript output. It catches a useful class of mistakes before we run the application. It doesn't replace testing, security review or checking that the feature actually does what we wanted.

The before and after

We checked the same code with both compilers on 21 October 2026.

Our classic tsc Native compiler, tsgo
Time 2 minutes 27 seconds About 25 seconds

That's roughly 5.9 times as fast, or about 83% less waiting for this check. Just over two minutes saved each time.

Same code. One compiler change. About 83% less waiting in our original spot check.

Those are our measurements on our application, not a promise about what it'll do on yours. This wasn't a repeated benchmark suite, and I'm not claiming laboratory precision from “about 25 seconds”.

That original spot check encouraged us to try the native compiler. The more detailed comparison below also shows why speed alone is not enough to replace our final check.

Why two minutes keeps adding up

A two-minute saving sounds fairly modest until you count how often you run the thing.

We searched our AI agents' command history. In the latest 24-hour window, there were 124 classic compiler runs across 46 agent sessions. In the preceding 24 hours, there were another 64 runs across 25 sessions.

124 compiler runs across 46 agent sessions in 24 hours. The little waits weren't little once we added them up.

Those are measured counts. The hours below are estimates, calculated by multiplying those counts by our measured per-run timings.

Command-history window Classic runs counted Agent sessions Estimated classic check time Estimated native check time Potential saving
Latest 24 hours 124 46 5.1 hours 0.9 hours 4.2 hours
Previous 24 hours 64 25 2.6 hours 0.4 hours 2.2 hours
Two days combined 188 Not deduplicated across windows 7.7 hours 1.3 hours 6.4 hours

Roughly 6.4 hours of aggregate compiler time could have been saved across those two days if every counted run had used the native compiler.

That is a what-if calculation, not time we've already banked. The native compiler was only available in our workflow during the second half of that period. The machine was sometimes busy, so individual runs won't all match the benchmark. Some checks ran in parallel too, which means aggregate compiler time isn't the same as hours off the working day.

Even with those qualifications, it's a useful indication of scale. I'm working on several features with several agents, and those agents sometimes depend on each other's work. A check finishing sooner can unblock the next step sooner too. If an agent is waiting for another agent to finish checking a change, the compiler sits in the middle of that handover.

When agents are waiting on each other, a faster check can unblock more than the agent running it.

At the busiest day's recorded workload, the estimated 4.2-hour saving would add up to roughly 21 aggregate compiler hours over five equally busy days. That's a projection, not a forecast: the previous day had fewer runs, not every check will move to the fast compiler, and some waiting overlaps.

I expect this to make the development loop noticeably quicker as we build multiple features. We haven't measured the effect on end-to-end feature delivery yet. Human review, dependencies and CI still take time. The useful bit is removing a repeated delay from a process we run all day, rather than pretending the whole development process is suddenly six times faster.

Memory was becoming a problem too. Our classic tsc used about 3 GB per run. With everything else running, three concurrent checks pushed our 24 GB machine into swap.

We hadn't measured native peak memory in that original comparison. The repeated comparison below shows that our tsgo invocation actually used more peak memory than classic tsc, while Vercel's compiler used less than either.

Fast while building, familiar at the gate

We haven't removed our existing classic compiler from the process.

Our rule is simple: use the fast compiler after small changes, then run our classic tsc once at the end of the task as the authoritative gate. Our classic tsc also runs in our CI pipeline for the final check.

So the agents get quicker feedback while they're building, and the final task check and CI still use our classic tsc.

Fast feedback while building. The familiar compiler at the final gate.

We invoke the native compiler through npx with a pinned package version. For this rollout, that meant no application dependency change and no lockfile change. We can evaluate it alongside the existing compiler rather than making a wholesale tooling switch first.

We also tried Vercel's compiler

That Vercel rabbit hole led to a small trial of tsc-ts, version 0.0.5, alongside our pinned tsgo build.

The route here is wonderfully odd. Microsoft's original compiler was written in TypeScript and ran as JavaScript. Microsoft ported it to Go for native speed. Vercel Labs then ported that Go compiler back into TypeScript, and used scriptc to compile it into a native executable.

TypeScript to Go to TypeScript to machine code. Apparently the scenic route was available.

That last step matters: this isn't simply the old JavaScript compiler running under another name. scriptc uses TypeScript's checked types and LLVM to produce machine code. Vercel describes tsc-ts as an experimental port of TypeScript 7.0.2.

For agents, the immediate benefit is a shorter edit-check-fix loop. There's also a tooling API: tsc-ts can serve compiler queries over standard input and output, and exposes a programmatic TypeScript API. That could help tools query types and symbols directly. It isn't unique to Vercel: the project documents compatibility with TypeScript 7's own API server.

I haven't found a special agent-only diagnostic format or evidence that it makes the reported messages less verbose. The documented aim is matching TypeScript's behaviour. Faster feedback and easier tooling integration are useful enough without inventing an AI feature.

Our first one-shot trial had Vercel's compiler behind tsgo on time, but ahead on peak memory. Then we repeated it, and the speed result reversed. A useful reminder to run the thing more than once before writing the headline.

After a discarded warm-up for each compiler, we measured three runs each using the same fast-check configuration. We rotated the order so each compiler ran first, second and third once, with only one compiler running at a time:

Compiler Median time Time range Median peak memory
Vercel's tsc-ts 0.0.5 9.37 seconds 8.18 to 11.00 seconds 2.29 GiB
tsgo 7.0.0-dev.20260707.2 20.89 seconds 20.87 to 20.92 seconds 4.49 GiB
Classic TypeScript 5.9.3 130.42 seconds 125.83 to 131.07 seconds 3.45 GiB

The repeated samples favour tsc-ts here. Rotating the order reduces one source of bias, but these are still shared-machine measurements. Caching and changing load remain limitations. This is evidence about these invocations on our code, not a universal compiler ranking.

The two native compilers matched each other's diagnostic output in every repeated run. The classic compiler did not match them exactly. Some differences were wording and type explanations; others changed the diagnostic category. We haven't established complete behavioural equivalence, which is why the classic compiler stays as our final gate.

Classic TypeScript ran on Node 22.23.2, matching the project's Node 22 requirement. The tsgo launcher used Node 24.13.0 before handing off to its native compiler; Vercel's compiler ran as a native binary. The project files were unchanged throughout. The timings include launch overheads, and the compilers have different runtime and threading behaviour. The earlier Node 18 baseline is excluded from this table.

We expect to move to Vercel's compiler soon, but we're giving it a little time to settle first. It's very fresh, and one afternoon's results aren't enough to make it our everyday default. For now, tsgo handles the small checks while we're building, and classic tsc remains the final task and CI gate.

Try it on your own project

From an existing TypeScript project's root, with its dependencies installed, you can compare your installed compiler with the pinned native preview build we used. Run them one after the other, using the same configuration:

# Your project's existing TypeScript compiler
npx --no-install tsc --noEmit -p tsconfig.json

# The exact native preview version used in this post
npx --yes --package @typescript/native-preview@7.0.0-dev.20260707.2 tsgo --noEmit -p tsconfig.json

The second command downloads that package into npm's cache if needed. It doesn't add it to your application's dependencies or edit the lockfile. This deliberately reproduces our pinned preview route, rather than upgrading your project to the latest TypeScript release. Microsoft's native preview instructions document the tsgo command; current TypeScript 7 releases use tsc instead.

If you also want to try the experimental Vercel version we measured:

npx --yes tsc-ts@0.0.5 --noEmit -p tsconfig.json --checkers 4

Its usage instructions describe the compiler arguments and checker threads. Our repeat benchmark used four checker threads for both native compilers and our own tsconfig.fast.json; use your project's configuration, and the same one for every comparison. These generic commands aren't a recreation of our app benchmark.

Let each compiler run once to warm things up, then repeat with the order rotated. Compare both the time and what it reports. Keep your existing final checks until you've established that the alternative behaves properly on your code.

The checks need to keep up with the coding

There's plenty of attention on how quickly AI can produce code. The checks around that code deserve some attention too.

The agents can get feedback sooner. The detailed trial also caught differences that a timing table alone would have missed. Faster checks are useful; keeping an authoritative final check is useful too.

I still have to test things and sign them off myself. Sadly, the Go rewrite hasn't fixed that bottleneck. 😁

Read more

ABOUT THE AUTHOR
Simon Dixon
SIMON DIXON
Technologist, CTO at Inkie, and Vibe Builder.