Salesforce · Filed Jun 27, 2025 · Published Jul 30, 2026 · verified — real USPTO data

Salesforce Patents a System That Makes AI Code-Writers Grade Their Own Tests

Salesforce is patenting a system where a second AI watches over a first AI's code writing, checking whether the tests it produces actually catch real bugs. It's quality control, automated all the way down.

Salesforce Patent: AI Agent Testing Pipeline for Code — figure from US 2026/0220028 A1
Figure from the official USPTO publication.
See all 10 drawings from this filing ↓
Publication number US 2026/0220028 A1
Applicant Salesforce, Inc.
Filing date Jun 27, 2025
Publication date Jul 30, 2026
Inventors Jiacheng Xu, Bo Pang, Jin Qu, Hiroaki Hayashi, Yingbo Zhou, Caiming Xiong
CPC classification 717/124
Grant likelihood Medium
Examiner CENTRAL, DOCKET (Art Unit OPAP)
Status Docketed New Case - Ready for Examination (Jul 24, 2025)
Parent application Claims priority from a provisional application 63751524 (filed 2025-01-30)
Document 20 claims

What Salesforce's AI code-testing pipeline actually does

Imagine a junior developer who writes code but never checks whether it actually works under stress. Now imagine assigning a senior developer to review that junior's work and give them a score. That's the rough idea here, except both roles are played by AI.

Salesforce is filing a patent for a pipeline where one AI agent generates software code, and a separate AI agent is assigned to test it. The testing AI doesn't just run the code to see if it crashes. It checks whether the tests cover enough of the codebase, meaning whether they actually exercise the tricky corners where bugs hide.

The tasks range from simple fill-in-the-blank checks ("complete this assertion statement") to harder ones like writing tests that span up to ten different files in a software project. Once the testing AI proves it can handle those challenges reliably, it gets deployed to vet real code before it ships.

How one AI agent evaluates another's test coverage

The patent describes a structured, multi-stage evaluation pipeline with two AI agents playing distinct roles.

The code generation agent produces a suite of source code files, the actual software being built. The code testing agent is then given the job of validating that code, but before it's trusted with real software, it has to pass its own exam.

That exam works in escalating steps:

  • Fill in missing pieces of assertion statements (statements that check whether code output matches expectations)
  • Write complete test cases given a specific function to cover
  • Write tests that cover multiple code blocks spread across several files, up to ten at once

For each task, the pipeline measures coverage percentage, which is a standard metric (how much of the source code the tests actually touch and verify). A test suite that only exercises 30% of your code leaves 70% unexamined.

Once the testing agent clears those benchmarks, it earns the right to validate the code generation agent's output before that output gets deployed to a real computing environment. The whole thing is designed to run automatically, without a human in the loop.

What this means for AI-generated software quality

AI coding tools like Salesforce's own Agentforce platform face a credibility problem: the code they produce can look correct but contain subtle bugs that only surface later. Adding a second AI layer dedicated to testing, and grounding that layer with measurable benchmarks before it's trusted, is one practical way to close that gap.

For enterprise software buyers, this is directly relevant. Salesforce sells to companies that can't afford production incidents, and a patented, documented testing methodology gives their AI coding tools a defensible quality story. Whether this approach ships inside a product soon or remains an internal research framework, it signals that Salesforce is thinking about AI code quality as an engineering problem with a structured solution, not just a prompt-engineering one.

Editorial take

This is a solid, unglamorous engineering patent doing important work. The idea of using one AI to grade another AI's test coverage isn't flashy, but it addresses a real and growing problem: AI-generated code that passes a surface check but falls apart in production. The benchmark structure (simple assertions up to multi-file coverage) is genuinely well-designed and worth paying attention to.

The drawings

10 drawing sheets from US 2026/0220028 A1 · click any drawing to enlarge

Patent filing page

Which company should we read for you?

We track 17 companies here. Pro is the same weekly breakdown for any company you choose, delivered privately. Type a name and we'll scope it and send you a quote.

Get one Big Tech patent every Sunday

Plain English, intelligent commentary, no hype. Free.

Source. Full patent text and figures from the official USPTO publication PDF.

Editorial commentary on a publicly published patent application. Not legal advice.