AI Wrote the Code in One Week, but Validation Took Months: The Danger of Blindly Trusting AI in Software Engineering

Software engineer reviewing and testing AI-generated code to ensure production reliability.
AI Can Write Code. Can You Trust It?

Artificial Intelligence is undoubtedly changing the way we build software. Tasks that previously took software engineers days or weeks can now be completed in a matter of minutes or hours.

With tools like Claude Code, GitHub Copilot, OpenAI Codex and Google Antigravity, developers can generate entire applications, refactor complex codebases, write unit tests, identify bugs and even automate parts of the deployment process.

These are exciting developments, and I strongly encourage software engineers to embrace them.

However, there is a growing concern that we are gradually beginning to confuse the ability to generate code with the ability to engineer reliable software.

A recent engineering publication by Anthropic, the company behind Claude, provides perhaps one of the most interesting examples of why we must be careful.

What Anthropic Accomplished With Claude

On November 25, 2026, Anthropic published an engineering article titled Migrating Our Messages API to Rust.

The company undertook a major migration of its Messages API from Python to Rust to improve performance and reduce infrastructure costs.

Claude generated an initial implementation of the core request path in approximately one week.

Following the completed migration, Anthropic reported:

  • Approximately 70% lower CPU usage per request.
  • More than 80% lower memory usage per request.
  • Approximately 20% reduction in median time to first token.
  • A migration completed without taking the service offline.

These are impressive company-reported results, although the measurements cover different portions of its production workload.

As reported by TechRepublic on November 26, what followed the initial implementation was months of testing, verification, engineering reviews and refinement.

That is the part of the story I believe every software engineer and engineering leader should pay particular attention to.

Writing the code was no longer the biggest challenge. Establishing confidence that the code worked correctly was.

When 98% of Tests Pass but Only 25% of Production Inputs Match

One of the most revealing findings from Anthropic’s migration was that, by April 2026, the new Rust implementation was passing approximately 98% of its tests.

Under normal circumstances, many teams would consider this an encouraging indication that a project was approaching completion.

However, when Anthropic compared the new implementation against the existing Python API using production traffic, only about a quarter of the inputs initially matched.

Think about that for a moment.

A system can pass almost all its existing tests and still exhibit significant differences when exposed to real-world conditions.

This does not mean that 75% of customer requests would necessarily have failed. Some differences were subtle. However, it demonstrated that the existing test suite was insufficient to establish that the two systems behaved equivalently.

This highlights a fundamental principle of software testing: tests can only validate the conditions they have been designed to check.

A passing test suite does not automatically mean that:

  • Every business requirement has been implemented correctly.
  • Every possible edge case has been considered.
  • The application is secure.
  • The system will perform reliably under production load.
  • Existing functionality has not been unintentionally affected.
  • The implementation is architecturally sound.

As software engineers, we must understand the difference between having tests and having confidence in the software those tests are supposed to validate.

The Danger of Allowing AI to Write Both the Code and the Tests

Another particularly concerning discovery was that, during an audit of approximately 700 migrated integration tests, Anthropic identified more than 100 weakened assertions.

In other words, some tests had been modified in ways that reduced their ability to detect incorrect behaviour.

This raises an important question.

If an AI agent writes the implementation, generates the tests, fixes the failing tests and subsequently reviews its own work, how independently has that implementation actually been validated?

Consider a simple example involving an online payment application.

You ask an AI coding assistant to implement a feature that prevents customers from withdrawing more money than they have in their accounts.

The AI generates the implementation and writes several unit tests. All the tests pass.

However, the tests only consider situations where transactions occur sequentially. They do not account for two withdrawal requests arriving simultaneously.

In production, both requests could read the same available balance before either transaction is completed, potentially allowing a customer to withdraw more money than is available.

The code compiles. The tests pass. The AI reports that the implementation is complete.

Yet the application contains a serious financial vulnerability.

Who is responsible?

Certainly not the AI tool.

The responsibility remains with the software engineer and the organization that approved the implementation.

This is why AI-generated tests should receive the same scrutiny as AI-generated application code. Engineers must independently evaluate whether the tests actually represent the business requirements and potential failure scenarios.

Why Human Code Review Still Matters

Anthropic’s engineering report also describes an interesting situation where a Claude agent proposed a solution that satisfied an automated verification check but was rejected by a human engineer.

The proposed implementation achieved the expected immediate output without addressing the underlying architectural requirement.

The engineer recognized that the solution would eventually need to be discarded and instructed the agent not to proceed.

This is an excellent example of the difference between satisfying a test and making a sound engineering decision.

An implementation can produce the correct result today while creating significant problems tomorrow.

For example, an AI-generated solution might:

  • Hardcode a value that should be configurable.
  • Introduce unnecessary dependencies.
  • Duplicate existing business logic.
  • Ignore established architectural patterns.
  • Fix a symptom without resolving the underlying problem.
  • Introduce technical debt that makes future development more expensive.

These are issues that automated tests may not immediately detect.

In my experience as a software engineer and engineering manager, evaluating a solution involves considerably more than determining whether it works.

We must also ask whether it is maintainable, scalable, secure, understandable and appropriate for the problem being solved.

I discussed a related principle in my earlier article, Fix .NET Memory Leaks in Linux Production, where I emphasized the importance of investigating root causes rather than relying on quick fixes.

AI has not made that principle any less relevant.

AI Should Accelerate Testing, Not Eliminate Engineering Judgment

It is important to clarify that Anthropic did not abandon AI during the verification phase and resort entirely to manual testing.

Quite the opposite.

The company used Claude agents extensively to investigate discrepancies and propose fixes. It also built a verification system that compared the new implementation with the behaviour of its existing production API.

Human engineers remained involved in designing the verification process, reviewing proposed changes, resolving architectural questions and determining whether solutions were appropriate.

This is precisely the approach I believe engineering teams should adopt.

Use AI to automate as much of the repetitive work as possible, but retain meaningful human oversight over critical engineering decisions.

There is a distinction between eliminating manual repetition and eliminating human responsibility.

The objective should not be to have engineers manually execute thousands of test cases that can be automated. The objective should be to ensure that competent engineers determine what needs to be tested, evaluate the adequacy of the evidence and retain accountability for the results.

Seven Practices for Safely Using AI in Software Development

Whether you are an individual developer, a startup founder or an engineering manager overseeing multiple teams, the following practices can help you benefit from AI without compromising software quality.

1. Define the requirements before generating code

Before asking an AI tool to build a feature, ensure that you understand the problem yourself.

Clearly define the expected behaviour, acceptance criteria, business rules, security requirements and potential failure scenarios.

AI cannot reliably compensate for requirements that nobody has properly understood.

2. Independently review AI-generated tests

Do not assume that a test is sufficient simply because it passes.

Review test assertions, expected results, boundary conditions and failure scenarios. Where possible, establish acceptance tests independently of the implementation.

Pay particular attention when AI modifies existing tests to accommodate new code.

A failing test should prompt an investigation, not automatically a modification of the test.

3. Maintain meaningful human code reviews

AI can assist with code reviews, identify potential bugs and suggest improvements. However, human engineers must still evaluate critical changes against the organization’s architectural standards and business requirements.

Never approve code simply because an AI tool has reviewed it and found no issues.

4. Make exploratory and manual testing part of your process

Automated tests are essential, but exploratory testing provides opportunities to identify behaviours that nobody anticipated when writing the test cases.

Developers, quality assurance engineers and business stakeholders can approach an application from different perspectives.

Test unusual user journeys, interrupted processes, unexpected inputs and combinations of actions that may not be represented in automated tests.

5. Validate software under realistic conditions

A feature that works perfectly on a developer’s laptop may behave differently in production.

Consider performance testing, load testing, security testing, concurrency testing and integration testing with representative data.

For major migrations, consider running the old and new implementations in parallel and comparing their behaviour before transferring production traffic, where this can be done safely without duplicating transactions or exposing sensitive data.

6. Protect critical engineering controls

AI agents should not have unrestricted authority to modify production infrastructure, access sensitive customer data, disable security checks or deploy high-risk changes.

Use appropriate permissions, protected branches, automated quality gates and approval requirements.

The greater the consequences of a potential failure, the stronger the verification and approval process should be.

7. Ensure engineers understand the code they approve

Before merging AI-generated code, the responsible engineer should be able to explain how it works, why the approach was selected and what could go wrong.

They should also understand how to troubleshoot the implementation if it fails in production.

If you cannot explain the code, investigate its behaviour or maintain it when something goes wrong, you should not consider the task complete simply because AI generated it.

What Engineering Managers Should Be Measuring in the AI Era

As engineering managers, we must also reconsider how we measure developer productivity.

If AI enables an engineer to generate thousands of lines of code in a single afternoon, does that necessarily mean the engineer has become more productive?

Not if the team subsequently spends weeks fixing defects introduced by that code.

Not if the implementation creates unnecessary technical debt.

And certainly not if customers experience production failures because the code was inadequately validated.

Engineering leaders should pay greater attention to metrics such as:

  • End-to-end delivery lead time.
  • Defects discovered after deployment.
  • Change failure rate.
  • Code review and rework effort.
  • Production reliability.
  • Customer satisfaction and business outcomes.

We should measure whether AI helps us deliver valuable, reliable software faster, rather than simply whether it helps us produce more code.

The ultimate measure of engineering productivity is not how quickly code is written. It is how effectively we solve problems and deliver sustainable value.

What This Means for Your Career as a Software Engineer

I believe one of the greatest dangers facing aspiring and junior software engineers today is the temptation to bypass the process of learning software engineering fundamentals because AI can generate the answers.

Why spend time understanding database transactions when AI can write the SQL queries for you?

Is there still a need to master design patterns when AI can generate an entire application architecture?

What is the point of learning software testing principles if AI can generate unit tests in seconds?

The answer is simple: you need that knowledge to determine whether AI has produced the right solution.

Without sufficient technical knowledge, you may not even recognize when an AI-generated implementation is incorrect.

As AI becomes increasingly capable of writing code, skills such as critical thinking, problem-solving, debugging, system design, software testing and technical judgment become even more important.

This is closely related to the career development principles I shared in Lessons for Software Engineers.

Your goal should not simply be to become someone who can prompt AI to build software. Your goal should be to become an engineer who understands software deeply enough to use AI effectively, challenge its recommendations and take responsibility for the solutions it produces.

Conclusion: Delegate the Work, Not the Responsibility

Anthropic’s migration from Python to Rust is an impressive demonstration of what AI-assisted software engineering can accomplish.

It is also a powerful reminder of why competent software engineers remain essential.

If a company that develops one of the world’s most advanced AI coding tools still invests months in validating AI-generated software, what makes the rest of us think we can completely bypass that process?

I am a strong advocate for using Artificial Intelligence to improve productivity. I believe engineers who refuse to embrace AI risk missing significant opportunities.

However, embracing AI should not mean abandoning the principles that have enabled us to build reliable software over the years.

Use AI to generate code.

You can also use AI to write tests.

You can still use AI to investigate bugs, review implementations and automate repetitive tasks.

But never allow AI to become your only source of confidence that the software is correct.

You can delegate the task of writing code to AI, but you cannot delegate your responsibility for the quality of that code.

The future of software engineering belongs to those who combine the speed and capabilities of Artificial Intelligence with sound engineering principles, critical thinking and human judgment.

That distinction may ultimately determine the difference between a developer who uses AI and a software engineer who truly understands how to engineer with AI.


Further reading:

Over to you: How does your engineering team validate AI-generated code? Have you ever encountered a situation where AI generated a solution that appeared correct but contained a significant underlying problem? Share your experience in the comments.

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like