Up to 85–90% of all tokens an autonomous coding agent burns when building a web app go not toward generating new lines of code, but toward repeatedly re-reading existing project files at every reasoning step. When I saw a breakdown of developer Nolan Lawson's recent study The AI cost of JavaScript frameworks in the Node.JS ru channel, that exact ratio made me open the raw benchmark tables. It overturns the core thesis of modern "vibe coding": the idea that it no longer matters how verbose your framework is because a neural network will type any amount of boilerplate for free.
In practice, it works the other way around. Imagine a carpenter hanging a shelf who has to read a thick binder of blueprints for the entire apartment from cover to cover before every hammer strike. The more boilerplate files, decorators, and folder-scattered abstractions a project has, the thicker that binder gets—and the more expensive each verification step becomes. Let's look at the numbers from Lawson's experiment to see which JavaScript stack is cheapest and fastest for autonomous AI agents, why one tool burns twice the budget of another, and what the user gets in the browser.
Experiment Setup: A Pokémon Catalog, PokéAPI, and Accessibility Tree Checks
To move framework debates onto hard measurements, Nolan Lawson (author of the Read the Tea Leaves blog) gave an AI the exact same task. The executor was the terminal coding agent Claude Code powered by Opus 5.5 with high reasoning effort enabled. Put simply: unlike a regular chat where a human copies code snippets back and forth, an autonomous agent works directly inside the project directory—creating files, running builds and servers in the terminal, reading errors, and patching code in a closed loop.
The task was straightforward: build a Pokémon catalog web app from scratch connected to the public PokéAPI REST service. The app had to load the list of creatures, support text search by name, filter cards by type, and open a detail view with character stats.
Lawson tested 12 JavaScript stack variants—from server-first setups and meta-frameworks (Astro, Hono with htmx, Nuxt, SvelteKit, Next.js) to component libraries (React, Vue, Solid), enterprise Angular, and plain JavaScript without UI frameworks (Vanilla JS). Because model outputs are probabilistic, each variant was run 5 times to calculate stable medians.
To keep the model from cutting corners on markup, every app was verified by an automated suite of functional tests over the browser's accessibility tree (accessibility tree). It is the semantic page map used by screen readers: regardless of which HTML tags render a filter button or search box, if an element cannot be found by semantic role or the Pokémon list fails to update after a click, the test fails and the agent goes back to fix the code.
Leaders in Speed and Budget: How Astro and Hono + htmx Save Agent Steps
Let's compare how two opposing architectural approaches solve the same Pokémon catalog task. In a classic single-page application (SPA), just to support a type filter, the agent has to wire up a client-side reactive state store, handle loading states, pass props down a component chain, and sync the filter with the URL. In server-oriented stacks, the same task is solved by returning ready-made HTML directly.
That contrast decided the top three finishers in the benchmark:
- The fastest stack was Astro: median development and test-passing time was 8.2 minutes.
- The cheapest option was the Hono server router paired with htmx: median cost stayed at $2.67 in 8.6 minutes.
- The fewest total tokens across the whole cycle went to Nuxt—3.85 million tokens.
Why did these tools win by such a margin? In Hono + htmx, there is no heavy client runtime and no duplicated logic between server and browser. A Hono route fetches data from PokéAPI and returns a ready HTML fragment, while a couple of declarative htmx attributes right in the HTML tell the browser where to swap in the filtered card list.
In Astro and Nuxt, file-based routing and single-file components deliver a similar edge. When data fetching, template, and screen styles sit in one compact file without extra wiring, Claude Code keeps the whole picture in context on the first try, avoids import mix-ups, and passes accessibility checks in the fewest steps.
Angular's Verbosity vs. Plain JavaScript: What We Pay For in Tokens
Now let's look at the bottom of the table and weigh the cost of architectural strictness. The worst result on both metrics came from Angular: median time hit 17.2 minutes and cost reached $4.97—nearly twice as slow and expensive as Astro and Hono + htmx. Context consumption for Angular climbed to 9.76 million tokens, 2.5 times higher than the leader.
Angular's strict abstractions—Dependency Injection, modules, decorators, separate template and logic files, strict TypeScript types, and reactive streams (RxJS or Signals)—were designed so large human teams write predictable code. When an autonomous agent does the work, however, you pay for that structure twice:
- Re-reading bloated context. Even with
Prompt Cachinglowering the cost of unchanged files, every new reasoning step forces the agent to run the step history and large codebase back through the context window (we broke down these mechanics in our article on AI agent token economics). - Compilation penalty loops. The smallest tweak to a filter requires updating a service, interface, decorator, and template in lockstep. Any type mismatch triggers a TypeScript compiler error, sending the agent into another cycle of reading and fixing.
You might reasonably ask: "If frameworks create that much overhead, isn't it simpler to write plain JavaScript with no libraries?" I had the same thought, yet Lawson's measurements disproved it. Plain JS (Vanilla JS) took 10.1 minutes and cost $2.98, losing to both Astro and Hono + htmx. Without a framework, the agent had to write its own DOM rendering and state management helpers from scratch, spending extra time on homemade infrastructure.
An autonomous agent works fastest and cheapest where a framework already provides routing and rendering primitives, without forcing dozens of boilerplate files for a single screen.
Lighthouse Scores, Client Bundle Weight, and the Production Caveat
Did paying twice as much for heavy stacks yield a better finished site? In Lighthouse tests, all twelve apps scored virtually the same: 97–100 for performance and 100 for accessibility. Client-side code weight in the browser, however, differed dramatically: Astro shipped 0 KB of client JavaScript on the home page, whereas the Next.js bundle exceeded 140 KB.
One important caveat: Lawson's test evaluates greenfield (greenfield) development from scratch. In mature enterprise systems, agent economics also depend on legacy code depth, test modularity, and automated checks (we wrote about those guardrails in our breakdown of autonomous AI agent engineering and harnesses). You don't need to rewrite an old monolith just for code generation, but on new projects a 2x price gap per run across a steady stream of tasks quickly adds up to thousands of dollars a month.
When choosing a stack for working with AI agents, remember: you are not paying for typing speed—you are paying for the volume of code the model has to re-read and connect at every reasoning step.

![Node.JS [ru]](/api/digests/it_development/daily/20261111/assets/sources/we-use-js.jpg?v=f8705c36e5a84a2687c5f2a9ed8e11e9ee5128d014f0ef7a1f572072e0921e4e)