As the barrier to software development continues to crumble under the weight of generative AI, the engineering community is beginning to ask a fundamental question: If our code is written by agents, do our traditional framework choices still make sense? A recent benchmarking effort by developer Nolan Lawson has reignited this debate, challenging the long-held assumptions regarding framework efficiency, cost, and the "AI tax" imposed by modern JavaScript stacks.
The AI Cost of JavaScript Frameworks: A New Benchmark
For years, the choice of a JavaScript framework was driven by developer ergonomics, community support, and runtime performance. However, as developers increasingly delegate coding tasks to autonomous AI agents like Claude, the criteria for "better" have shifted. Does a framework that is easy for humans to write also represent the most cost-effective path for an AI agent?
Nolan Lawson recently set out to answer this by tasking Claude with building the exact same application across twelve different JavaScript stacks. The goal was simple: to test the common industry claim that certain frameworks are inherently "better for agents."

The Chronology of the Experiment
The experiment was designed to be rigorous. Lawson provided the AI with consistent prompts across 12 distinct environments, ranging from lightweight setups to heavy-duty, opinionated frameworks.
- The Setup: The AI was given a standard project specification.
- The Execution: The same app was generated five times in each of the twelve stacks.
- The Data Collection: Lawson measured the token usage and overall cost of the AI’s output.
- The Comparative Analysis: Complementary research by Gautam Parab provided a statistical check on these findings.
The results were surprising. While many proponents of specific frameworks argued that their chosen stack would lead to lower AI costs due to simpler syntax or fewer boilerplate requirements, the data suggested otherwise. Parab found that for most pairs of frameworks, the observed cost ranges either overlapped or touched, suggesting that the "intelligence" of the model—and the inherent complexity of the task—far outweighed the marginal savings provided by a specific framework’s structure.
Supporting Data: The Weight of the Payload
While the cost of writing the code via AI may have been statistically noisy, the cost of running the code in the browser showed a much clearer, more concerning trend. The "JavaScript tax"—the amount of bytes sent to the client—varied drastically.

- Astro: Led the pack with a lean 0KB of baseline JavaScript.
- Hono + htmx: Followed with a respectable 18KB.
- SvelteKit: Sat in the middle with 36KB.
- React Router, TanStack Start, and Next.js: Clustered at the high end, shipping between 115KB and 142KB of JavaScript to the browser.
These figures raise an uncomfortable question for the modern web: If we have moved into an era where AI handles the heavy lifting of writing code, why are we still shipping increasingly heavy bundles? Lawson argues that if a developer has gone "hands-free"—relying on agents to generate their architecture—they are no longer bound by the legacy of their previous manual preferences. If the AI is doing the work, shouldn’t we be prioritizing architectures that result in the smallest possible footprint for the end user?
Implications for Modern Software Development
The shift toward agentic coding is not merely a change in workflow; it is a change in the product lifecycle. As models like those from Anthropic and OpenAI become the primary authors of our application logic, the "human-friendly" features of frameworks—such as complex abstraction layers or "magic" syntax—may become less valuable than "machine-friendly" features, such as strict type safety and minimal runtime overhead.
The Rise of Local AI
As the debate over framework costs continues, a parallel trend is gaining momentum: the move toward local AI. Services like Master.dev are advocating for running large language models (LLMs) directly on local hardware. The implications here are significant:

- Privacy: By keeping code on a local GPU or Mac, companies avoid the potential data leaks associated with sending proprietary code to the cloud.
- Cost Efficiency: By eliminating the per-token bill associated with cloud-based API calls, teams can iterate endlessly without the "AI tax" hindering their experimental phase.
- Editor Integration: Wiring these local models into terminal agents allows for a seamless, private, and zero-cost development loop.
Lessons from Microsoft: When Optimization Fails
The complexities of modern JavaScript are further illustrated by Microsoft’s recent work on clarity.js. In an attempt to shrink their analytics script, the team ran over 50 experiments using an AI agent.
The findings were counterintuitive. While dropping import * namespace objects led to a significant reduction in file size, other "good practice" refactors—such as extracting common helpers into smaller, modular functions—actually increased the gzipped size of the final output. This serves as a cautionary tale for those who assume that cleaner code always equates to better performance. In the world of JavaScript, the interplay between compression algorithms and code structure remains a delicate, often unpredictable dance.
Security in the Age of Automation
The reliance on third-party packages remains the Achilles’ heel of the JavaScript ecosystem. With the recent wave of package hijacks, the developer community is adopting a "defensive" posture. Bruno Jurković, for example, has instituted a mandatory "one-week cooling-off period" for any new package installations within his organization.

This approach highlights a critical reality: automation makes it easier to pull in code, but it also makes it easier to accidentally import malicious dependencies. While AI can help scan for vulnerabilities, the human element—the decision to wait, to verify, and to isolate—remains the final line of defense against supply-chain attacks.
A Future Beyond the Monoculture
Kate Holterhoff of RedMonk recently warned that the web cannot afford a "JavaScript runtime monoculture." As the industry converges on a few heavy-weight frameworks, the diversity of the web risks narrowing. The findings from Lawson’s benchmark support this concern; when the industry standardizes on high-payload frameworks, we collectively lower the performance floor for the entire web.
The Path Forward: Hiring and Innovation
Laurie Voss, co-founder of npm, suggests that the traditional coding interview is dead. If junior engineers can use AI to solve the "easy" problems, the hiring process must shift toward assessing architectural thinking, security awareness, and the ability to manage the very agents that are writing the code.

Similarly, the emergence of tools like CodeAF—which claims to fix issues 2x faster than current open-source alternatives—suggests that we are only in the first inning of the AI-coding revolution. These tools, which operate under permissive licenses like Apache 2.0, are democratizing access to high-performance coding agents, further challenging the dominance of paid, closed-source models.
Conclusion: The New Metric of Success
As we look toward 2027 and beyond, the measure of a successful JavaScript project will no longer be how quickly a human can write it, but how efficiently an agent can architect it.
Nolan Lawson’s benchmark provides a vital starting point. It forces us to confront the "AI tax" we pay—both in terms of token costs and the heavy JavaScript payloads we ship to our users. For the developers of tomorrow, the goal is clear: leverage the power of AI to build applications that are not just easy to write, but fundamentally faster, smaller, and more secure.

The framework wars of the past were about developer preference. The framework wars of the future will be about machine efficiency. It is time to audit our stacks, demand lighter runtimes, and ensure that in our rush to automate, we haven’t forgotten the primary goal of the web: to deliver performant experiences to the user, regardless of how the code was generated.

