Software

Have a second AI pass try to break your code

A developer built a web app prototype with Claude in a weekend and caught a payment bug the model missed, then added a separate 'skeptic' review pass.

Done with Claude

What they did

A developer used Claude to build a web app over a weekend. Claude wrote the setup, database and main feature while he steered and read the code. When Claude wrote the payment handler, he noticed it told the payment company 'success' before saving the record.

How it went

He says setup took a couple of hours and the core feature worked by Sunday. The payment bug compiled and passed Claude's own test; he only caught it because he had shipped the same bug years ago.

Worth knowing

His fix is structural: the model that writes code never approves it. A separate pass is asked 'find the input that makes this lose money', and a human makes the final call.

Try it yourself with Claude

You are reviewing a code change, not writing it. Here is the change: [paste diff]. Do not praise it. Try to break it. List the specific inputs, retries, timing problems or failures that would make it lose data or money, with the exact lines involved. Pay special attention to the order of steps, such as replying 'success' before saving. Rank the problems by how much harm they would cause and suggest the smallest fix for each. Do not edit any files; show me your findings first.

Swap the highlighted [parts] for your own details.

Read the original

Source: DEV Community · Info Inlet · Oct 17, 2026

Written with AI assistance from the original post and checked against our editorial guidelines. Results are as reported by the source, not independently verified.

Get 5 use cases every day

The best things people got an agent to do yesterday, each with the prompt. Free, one email a day.

See today's issue