AgentReceipt

How to catch an AI agent weakening your tests

By the AgentReceipt team · Updated 13 November 2026

You ask an agent to fix a failing test. The build turns green. But did it fix the code, or change the test? This is one of the easiest problems to miss in review, and one of the most important to catch.

The signs, in a diff

When reviewing, look for these in test files and test configuration:

  • a test that was deleted, or commented out
  • a skip marker added to a test that used to run
  • an assertion made looser, such as an exact value replaced by “anything”
  • a snapshot rewritten to match the new output without a reason
  • a coverage or failure threshold lowered

Ask where the change was made

A good rule: if the task was about behaviour in the code, the diff should mostly be in the code. A diff that is mostly in tests deserves a closer read.

Catch it without reading every line

AgentReceipt has a fixed rule for weakened tests. When a session deletes or disables tests or loosens them, the receipt carries a flag that says so and shows the lines, so you look at the right place first. Because it is a fixed rule, it gives the same answer every time.

npm install -g @agent-receipt/cli
cd your-repo
agentreceipt init --pre-push
agentreceipt check

Make the check part of your routine

Run the check before you push, and look at the receipt when you review a pull request that an agent helped with. A short habit beats a long audit.