Historically, picking a web stack meant weighing familiar trade-offs: client bundle size, TypeScript ergonomics, component ecosystem maturity, and how easy it is to hire engineers.
In 2026, with autonomous coding agents like Claude Code, Cursor, and OpenAI Codex writing a huge share of our code, a brand-new economic metric has crashed the party: AI Cost per Feature—how many dollars in LLM tokens it takes to generate and debug a working app.
Web standards expert and former Salesforce engineer Nolan Lawson investigated this exact pattern. In a widely discussed study by Nolan Lawson, he ran a blind benchmark comparing token spend when generating the exact same app across 12 modern JavaScript frameworks.
His results cast popular framework boilerplate in a completely different light.
Experiment Setup: One Spec for an Autonomous Agent
Lawson gave the agent a crisp, realistic product brief:
- Build a Pokémon catalog web app backed by the public PokéAPI REST API;
- Implement a searchable, paginated list, character cards, and a detailed stats view;
- Include basic responsive layout and baseline WCAG accessibility;
- Use a frontier agent powered by Claude 3.5 Sonnet / Claude Opus inside an isolated workspace pre-initialized with each framework's starter template.
Each framework got five independent runs from scratch. Lawson tracked total API token cost in dollars, how many "write code → run tests → fix compile errors" loops the agent needed, and whether the final build actually worked.
Here's how concise server-side routing looks in the winning Hono + htmx stack:
import { Hono } from 'hono';
import { html } from 'hono/html';
const app = new Hono();
app.get('/pokemon/:id', async (c) => {
const id = c.req.param('id');
const res = await fetch(`https://pokeapi.co/api/v2/pokemon/${id}`);
const data = await res.json();
return c.html(html`
<div class="pokemon-card" id="pokemon-${data.id}">
<h3>${data.name}</h3>
<img src="${data.sprites.front_default}" alt="${data.name}" />
<div class="types">
${data.types.map((t: any) => html`<span class="badge">${t.type.name}</span>`)}
</div>
</div>
`);
});
export default app;
Benchmark Results: Ranking Stacks by Dollar Cost
The spread in real dollar cost across frameworks was dramatic:
- Hono + htmx: $2.67 (cheapest and most reliable stack; pure server-rendered HTML with no client runtime);
- Astro: $2.76 (islands architecture with zero JS by default);
- Remix / React Router v7: $3.81;
- Next.js (App Router): $3.94;
- SvelteKit: $4.28;
- Angular: $4.97 (the most expensive stack—and in 2 out of 5 runs, the agent failed to produce a working build at all).
Look at that gap: generating the app in Angular cost nearly twice as much as Hono! And 40% of the time, the model got tangled up in strict Dependency Injection, modules, and decorators, burning through its step budget and leaving behind a broken build.
Compare that with the same component in lightweight Astro:
---
// Astro component: clean server-side data fetching with no client runtime
const { id } = Astro.params;
const res = await fetch(`https://pokeapi.co/api/v2/pokemon/${id}`);
const pokemon = await res.json();
---
<div class="pokemon-details">
<h2>{pokemon.name}</h2>
<img src={pokemon.sprites.front_default} alt={pokemon.name} />
<ul>
{pokemon.stats.map((stat: any) => (
<li>{stat.stat.name}: {stat.base_stat}</li>
))}
</ul>
</div>
Notice how many fewer tokens the model needs to express the exact same logic: no classes, no services, no RxJS subscriptions. Fewer tokens mean fewer chances to hallucinate or trip a compiler error. If you enjoy real-world benchmarks of agent workflows, check out our piece on benchmarking AI agent stacks.
Why Boilerplate Is Now a Direct Financial Tax
Lawson's takeaway is hard to ignore: in the AI era, syntactic verbosity is no longer just a matter of developer taste—it's a direct line item on your engineering bill.
Frameworks packed with ceremony and heavy configuration force agents to juggle huge context windows and burn expensive iterations fixing compiler complaints. Lean, web-standards-first tools like Hono, Astro, plain HTML, and Fetch/Request don't just load faster for users—they cost your company noticeably less when agents write the code.

