Security

AWS Project C2 Finds 800+ Bugs That Advanced AI Models Miss

Amazon Web Services says a new system called Project C2 pairs AI with mathematical logic to catch rare software bugs that even frontier models miss—and it has already found more than 800 of them.

AWS Project C2 combining AI and automated reasoning to find rare software bugs
Project Code Confidence combines agentic AI with automated reasoning to hunt rare concurrency and distributed-system bugs.

Amazon Web Services (AWS) has shared details of Project Code Confidence, also called Project C2. The approach pairs agentic AI with automated reasoning—a field that uses mathematical logic to prove, disprove, or analyze how systems behave.

In tests on 22 popular open-source projects, AWS reported finding more than 800 bugs, including complex race conditions and thread-safety problems. The company says it shared fixes with maintainers and is also applying the technique to business-critical services such as Amazon Aurora, Amazon DynamoDB, and Amazon Elastic Block Store (EBS).

Why rare bugs matter at cloud scale

AWS authors Marc Brooker and Soonho Kong describe a long-standing cloud lesson: a one-in-a-million error can still appear often when a system handles enormous traffic. In 2015, they say AWS saw such rare errors a few times each second. Over a decade later, those events can happen thousands of times a second.

The bugs Project C2 targets are not always the “security vulnerability” bugs attackers use to break into systems. AWS still calls them important. Left alone, they might drop a few bits of data—or take a whole service offline.

These defects often hide in code that handles errors and failures. Distributed systems exist to survive broken hardware, buggy neighbors, and human mistakes. Those failure paths run less often, but when they do, they are critical. As more customers automate operations with agentic AI, AWS says lowering bug density becomes even more important.

Simple scale rule: if something is rare per request, a huge number of requests can still make it common in real life.

What today's best AI models still miss

Concurrent and distributed systems can run events in staggering numbers of orders. AWS compares that complexity to a shuffled deck of cards: there are so many possible orders that no person—and no frontier AI model—can inspect them all by brute force.

One example they give is Paxos, a protocol that helps machines agree on a value. A single agreement round among three machines can already unfold in more than 90,000 unique orders. Add lost packets, retries, duplicates, and other odd cases, and the count grows even faster.

AWS says its experience suggests even strong agents struggle to diagnose and fix subtle distributed-system bugs because there are too many variables and orderings. Combining neural models with mathematical tools such as the Lean theorem prover lets teams check millions or billions of cases by writing proofs about what can happen under every possible order—without literally trying every order.

Most existing tools lean on known patterns (static analysis and security scanners) or on an AI model's raw judgment (AI code review and coding agents). With billions of edge cases, AWS argues those approaches still miss rare failures.

How Project C2 works

Project C2 takes a different path from ordinary AI code review:

  1. Understand intentRead the code and supporting docs to learn what the system should do.
  2. Try to prove correctnessAttempt to prove that the built system matches that intent.
  3. Handle mismatchesEither the intent model was wrong and needs another loop, or a real bug was found.
  4. Prove the bug is realBuild a test that exercises the bug in the real implementation.
  5. Rate and fixScore severity, then develop, test, and even prove the correctness of a fix.

AWS says it folded more than ten years of automated-reasoning experience into a service designed for broader use, with retries, guardrails, parallelization, and layer-by-layer performance work. Customers do not need to be AI or formal-methods experts, and the company says the technique can examine anything from a single library to an entire distributed system. Access is opening to a limited number of customers first, with expansion planned as onboarding continues.

Real bugs in widely used projects

Project C2 has found issues in both distributed systems and single-machine code, especially multithreaded and concurrent code. In one Rust performance-profiling library popular in that community, AWS reported nine local thread-safety bugs, including one that could make a reporting thread panic and later lose data. Similar bugs appeared in popular open-source database and storage engines—even on a single machine and sometimes with no failures present.

AWS says it has run the approach on hundreds of codebases and found similar bugs in nearly all of them. Reports have included detailed reproductions—often with automated tests—and tested patches.

Example 1: a durable-write flag that was cleared too soon

In a popular open-source in-memory database, writes are logged so data can survive a reboot. After each log write, the database asks the operating system to make sure the data is saved to disk. If that fails, the database sets an error flag and refuses further writes.

Project C2 found a case where a background process can retry the check after a failure and clear the error flag if the second try succeeds. Once the flag is cleared, the node can accept writes again. On systems such as Linux, though, the second success does not mean “everything is now on disk.” It can mean “new data after the failed first try is on disk.” After a reboot, critical earlier data may still be missing.

Example 2: a Raft lease revoke after leadership changed

In a widely deployed open-source distributed key-value store built on the Raft consensus protocol, servers use leases to reserve a resource for a limited time. Keep checking in, and your claim should remain until the lease ends.

One computer—the leader—handles expired leases. It finds a batch of expired leases, checks once per batch that it is still the leader, then proposes revoking each lease. If it loses leadership while still working through the batch, it may keep revoking using old information. A new leader may already have given those leases to new owners. That is a distributed version of a classic time-of-check to time-of-use (TOCTOU) bug.

AWS warns this kind of bug can cause arbitrary bad cluster behavior—for example, a system that should have one payment processor ending up with two and double-charging customers.

Important note: AWS says the point is not to criticize high-quality projects. The point is how subtle these bugs are—and how hard they are for humans or AI models alone to exhaustively reason about.

What comes next

AWS presents Project C2 as one way to raise reliability across its own systems and, over time, for customers who run software beyond AWS as well. Over the coming months, the company plans to add more automated-reasoning techniques spanning bug finding through regression testing.

What It Means for Developers

Project C2 is a reminder that AI code helpers are powerful—but rare concurrency and distributed failures still need stronger guarantees than a model “feeling” that the code looks fine.

What It Means for Software Developers

Everyday coding habits still matter. Many of the bugs AWS highlights live in error paths, retries, and “what if this fails twice?” logic.

  • Write tests for failure paths, not only the happy path.
  • Treat flags, leases, and durable-write confirmations as safety contracts, not casual status bits.
  • When AI suggests a fix, ask for a reproduction test that fails before the patch and passes after.
  • Do not assume a frontier model has considered every interleaving in concurrent code.

What It Means for Backend Developers

Backend engineers who build APIs, databases, queues, and coordination services are closest to the bug classes AWS describes: race conditions, thread safety, leadership changes, and durability checks.

  • Review retry logic carefully—retries can hide incomplete durability.
  • Re-check leadership or ownership before each sensitive action, not only once per batch.
  • Use property-based or concurrency tests where possible, especially around shared state.
  • If you ship services with Node.js or Express, remember async timing bugs are cousins of the same ordering problem.

What It Means for DevOps Engineers

Reliability work is also an operations story. Rare bugs show up as flaky incidents, silent data loss, or mysterious outages under load.

  • Track failure-path alerts and durable-write errors as high-signal signals, not noise.
  • Practice incident reviews that ask whether a TOCTOU or leadership-change race could explain the event.
  • Keep staging environments able to inject packet loss, retries, and leadership flips.
  • Harden cloud edges with guides such as AWS security groups and AWS WAF, while remembering Project C2 targets deeper application and systems bugs inside the service itself.

What It Means for Full-Stack Developers

Full-stack teams may not write Raft implementations, but they depend on systems that do. Product features that assume “exactly one worker” or “data is already on disk” can fail in surprising ways when those promises break.

  • Design idempotent writes and clear ownership rules in application workflows.
  • Surface durable-state failures to users and operators instead of swallowing them.
  • When evaluating AI coding assistants, separate “helps write code faster” from “proves rare cases are safe.”

What to watch next

A few practical checkpoints follow from the announcement:

  1. Customer accessProject C2 starts with limited onboarding; broader availability will show how portable the technique is outside AWS.
  2. More reasoning methodsAWS plans to expand from bug finding into areas such as regression testing.
  3. Open-source follow-throughWatch how maintainers adopt the reported reproductions and patches over time.

Bottom line

AWS Project C2 combines agentic AI with automated reasoning to hunt rare bugs that even advanced models miss. In early work, that approach found more than 800 issues across 22 popular open-source projects and is already being used on critical AWS storage and database services.

For developers, the message is clear: AI can help review code, but mathematical reasoning still matters when systems must survive every ordering, retry, and failure path at cloud scale.

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author