All Blogs

Senior Engineer vs. 6 AI Agents: A Real-World Enterprise Codebase Experiment

Jun 10, 2026By Philipp Melab9 min read

In Short: The Real-World AI Agent Code Trial

  • The Experiment: A Senior Developer went head-to-head against 6 AI agent implementations (including Claude Max, GPT, and Mistral) to add a user management page to a strict React 19 and TypeScript codebase.
  • Context Over Documentation: AI agents systematically ignored written markdown guidelines (like form validation rules) but perfectly replicated architectural patterns present in neighboring code files.
  • The Remediation Tax: Evaluating AI solely on token costs is flawed; the metric that matters is senior dev refactoring time. While Claude Max yielded an 80% cost savings, lower-tier models resulted in a net-negative TCO because they faked network latency and broke core caching mechanisms.
  • Type Drift Vulnerability: Agents frequently struggle with automated data schemas, creating runtime bugs by manually re-declaring types with incorrect shapes or casing variations.
  • The Engineering Imperative: To leverage autonomous agents safely, human engineers must shift to building highly rigid scaffolding (strict TypeScript flags, strict linting) that leaves the models with zero paths to wander off-track.
  • The Infrastructure Solution: Centralizing access through a platform like the amazee.ai AI Gateway allows enterprise teams to safely route, test, and swap these frontier engines behind a single, policy-governed endpoint.

This blog is based on an article originally written in February 2026, so some information may now be outdated.

There’s no shortage of flashy demos of AI agents spinning up apps from a single prompt. But there’s a massive gulf between generating a standalone landing page and shipping a tightly integrated, type-safe feature inside a massive enterprise codebase.

To see how modern agents handle real-world engineering constraints, I ran a rigorous head-to-head experiment. I pitted myself, a Senior Developer, against 6 AI-agent implementations (Claude Max, GPT, Claude AWS, Kimi, MiniMax, and Mistral).

The assignment was to add a user management page (/ai/team) based on a highly aspirational UX mockup. To test how the agents navigated real-world obstacles, the backend legacy API was left with massive blank spots, including a user role property that was a generic string with no available options.

The Environment & The Stack

I wanted to eliminate the “it works on my machine” factor and force the models to reason about modern, strict TypeScript architectures.

  • The Core: React 19, TanStack Query (React Query), Effect, Waku, @base-ui/react, and Tailwind CSS.
  • The Rules: Ultra-strict TypeScript configs, specifically enabling strict: truenoUncheckedIndexedAccess: true, and exactOptionalPropertyTypes: true.
  • The Data Layer: Automated TypeScript types generated directly from OpenAPI and GraphQL schemas.

First, I established the baseline or “gold standard”, taking 14 hours of net development time to implement the page flawlessly, complete with idiomatic state management and robust error handling. Then, I handed the exact same repository and prompt to the agents.

The Raw Metrics

On paper, the agents’ initial outputs looked impressive. They generated thousands of lines of code, wrote End-to-End (E2E) specs, and executed for pennies in compute costs.

MetricManual (Human)Claude MaxGPTClaude AWSKimiMiniMaxMistral
Lines Changed+2072 / −857+6182 / −18+1690 / −14+2592 / −12+3313 / −28+3061 / −24+2014 / −10
Files Changed37441230343322
E2E Specs Written2226333
Raw Token CostN/A$4$10$20$7$6$30
Initial Dev Time14h2–3h8–11h5–8h7–10h12–17h10–14h

But as any developer who has inherited a legacy codebase knows, lines of code added are often a liability rather than an asset. When I opened the pull requests, I found major architectural divergence.

Where the Agents Diverged from Idiomatic Code

While almost all the agents managed to render a UI that visually worked, their underlying architectural choices fell into a few classic patterns of technical debt.

1. The Form Handling Trap: Neighboring Code Beats Documentation

I had placed extensive, highly detailed markdown documentation in the repository outlining coding standards, including explicit instructions to use react-hook-form and Zod for forms. Every single agent ignored those written instructions. They all defaulted to standard LLM training data patterns: tracking form inputs via manual useState strings and validating emails with fragile, copy-pasted regular expressions.

Yet all the models successfully built complex Effect-based GraphQL resolvers. Why? Because examples of those resolvers already existed in neighboring files. The core takeaway is that written documentation is far less important to an AI than the code it runs alongside. Models will ignore your markdown guidelines, but they will perfectly replicate the architectural patterns they see in nearby files.

2. Optimistic UI: Syncing Cache vs. “Faking It”

When a user updates a teammate’s role, the UI should ideally update instantly, rolling back only if the API call fails. I observed two radically different architectural patterns emerge here:

  • The Right Way: My self, Claude Max, Claude AWS, and Kimi, used TanStack Query’s cache properly. We manipulated onMutate, took a cache snapshot, updated via setQueryData, and handled the rollback on error. Claude Max even abstracted this into a highly clean, reusable useOptimisticMutation hook.
  • The Shortcuts: GPT, MiniMax, and Mistral bypassed the cache entirely, tracking the mutation state locally in the component. Worse, MiniMax and Mistral literally hardcoded setTimeout(() => {}, 1000) blocks to simulate network latency instead of integrating with the actual promise lifecycle.

3. Type Drift and Schema Mismatches

With automated OpenAPI code generation, you should inherit types, not write them. I didn’t manually declare a single type that already existed in the schema. The agents, however, struggled with strict types:

  • GPT manually re-declared MemberRole and TeamMember types, but changed the data shapes, such as defining an ID as a string when the backend schema explicitly demanded a number.
  • Kimi introduced a silent runtime bug by declaring a user role as an all-caps string ('ADMIN'), while the backend code generator expected PascalCase ('Admin').

The Remediation Tax: Calculating True TCO

Evaluating an AI agent solely on token cost misses the point. The metric that actually matters for engineering teams is Remediation Time: How long does it take a senior dev to refactor the agent’s code to meet production standards?

Assuming a standard engineering cost of $100/hour, I calculated the Total Cost of Ownership for each run. This includes the initial token costs, the time I spent nudging the agent, and the time required to rip out bad abstractions, like fake timeouts and manual state tracking.

Total Cost of Ownership (TCO) Breakdown:

Manual Baseline: ██████████████████████████████ $1,400
Claude Max:      █████ $256 (80% Savings)
Claude AWS:      █████████████ $680 (51% Savings)
GPT:             ███████████████████ $965 (31% Savings)
Kimi:            █████████████████████ $861 (38% Savings)
Mistral:         █████████████████████████████ $1,245 (Cost-Neutral)
MiniMax:         █████████████████████████████████ $1,459 (Net-Negative)

The Breakdown:

  • The Outlier: Claude Max was incredibly efficient. For a raw token cost of $4 and about 2.5 hours of human cleanup, mostly removing some minor feature creep, it yielded an 80% net savings. Its component separation was clean, and it understood the data layer.
  • The Monoliths: GPT and Claude AWS saved some time but required heavy refactoring. GPT, for example, dumped 1,045 lines of code into a single, massive file that had to be manually decomposed.
  • The Net-Negatives: MiniMax and Mistral actually cost more than writing the feature from scratch. Because they faked the API mutations with local states and timeouts, a senior engineer would have to throw away their entire data-fetching architecture and rebuild it properly.

The Takeaway

Agents aren’t taking senior engineering jobs anytime soon, mostly because they struggle with contextual awareness. They don’t look at your package.json to see how you handle forms, and they don’t look at your existing patterns to see how you handle state. They write the most generic version of the code requested, which often violates strict linting and architectural rules.

However, my experiment shows that if you establish a highly rigid baseline with strict TypeScript flags, automated code generation, and tight linting constraints, the top-tier models like Claude Max have fewer paths to wander off-track.

The real job of a senior engineer right now is not to write endless text prompts or massive documentation files. The job is to craft an impeccable, rigid initial scaffold. If you give the models a high-quality pattern in the code itself, they will replicate it endlessly.

Try it Yourself

Want to run agents against your own stack, but keep model access controlled?

The amazee.ai AI Gateway provides teams with a single integration point for multiple frontier models while keeping usage private and under governance.

  • Multi-model routing behind a single endpoint, so you can evaluate and swap models without refactoring your toolchain.
  • Policy-controlled data flow for prompts, code, and artifacts so sensitive context stays protected.
  • Centralized access control and auditability to prevent model experimentation from turning into unmanaged shadow tooling.

If you are standardizing secure access to frontier models for engineering workflows, get your key now.

Route every model behind a single, policy-governed endpoint.

The amazee.ai AI Gateway keeps your code, prompts, and artifacts private while you evaluate, swap, and ship.

Frequently Asked Questions

Phillip M Portrait

Author

Philipp Melab, Staff Engineer - AI

Philipp Melab is a Staff Engineer - AI at amazee.ai, specializing in architecting AI provider-independent development workflows, automated agentic systems, and high-performance enterprise APIs utilizing TypeScript, Zod, and Effect. He holds a BSc in Software Engineering & Knowledge Management and has spent over a decade driving technical execution and schema-first design within the amazee ecosystem. A long-time advocate for decoupled system architectures, Philipp has a rich history of contributing to open source data layers, including early foundational work on enterprise GraphQL API integrations. He is a frequent technical speaker who has presented on complex system abstractions and multi-endpoint software infrastructure at major developer conferences worldwide.

Related Blogs

  • TFiR "The Agentic Enterprise" video interview featuring a side-by-side split screen of host Swapnil Bhartiya andMichael Schmid
    Agentic AIPrivate AI InfrastructureAI Security

    Running Autonomous AI Agents Without Losing Control of Your Data

    June 24, 2026 • Jason Lewis • 5 min read

    Running autonomous AI agents locally or on public clouds leaks data. Learn how to deploy them securely via a secure, private LLM infrastructure.

    Read more
  • A futuristic interface graphic featuring a prohibited symbol over an AI brain network, symbolizing the suspension of Anthropic Fable 5 and Mythos 5 models.
    LLMs / AI ModelsAI SecurityPrivate AI Infrastructure

    The Sudden Suspension of Anthropic’s Fable 5 and Mythos 5: What We Know So Far

    June 16, 2026 • Katy Walsh • 6 min read

    Anthropic suspended Claude Fable 5 & Mythos 5 over US export controls. Learn why a private LLM API & sovereign AI infrastructure are critical for continuity.

    Read more
  • Tech graphic with amazee.ai logo
    Agentic AIPrivate AI InfrastructureBuild with AI

    How We Build at amazee.ai: Speeding Up AI Coding Agents Without Cutting Corners

    May 26, 2026 • Lauren Morris • 7 min read

    Build 10x faster without cutting corners. See our agent-native stack (Drizzle, Zod, TypeScript) and how we use private AI gateways for secure Lagoon deploys.

    Read more
  • Tech Graphic
    LLMs / AI ModelsAI Data PrivacyPrivate AI Infrastructure

    How To Choose the Right LLM: Implementing a Secure Multi-Model AI Plan

    May 18, 2026 • Katy Walsh • 13 min read

    Learn how to choose the right LLM for your business using a multi-model strategy anchored in sovereign AI infrastructure and a secure private LLM API.

    Read more
  • Tech Graphic
    Agentic AIAI Data PrivacyPrivate AI Infrastructure

    Persistent AI Memory: Who Really Owns Your AI Agent’s Notes?

    April 28, 2026 • Lauren Morris • 9 min read

    Tired of retraining your AI every day? Persistent memory fixes the "reset" gap, but who owns the data? Learn how to own your agent's memory with amazeeClaw.

    Read more
  • Agentic AIBuild with AIPrivate AI Infrastructure

    Introducing amazeeClaw from amazee.ai: Secure, Private Hosting for OpenClaw

    March 31, 2026 • Michael Schmid • 7 min read

    Managed OpenClaw hosting on ISO 27001 & SOC 2 infrastructure. Secure your AI data with private isolation and regional residency. No manual setup needed

    Read more