Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
See it fail: red before green and break-it checks card 1 of 6

Green, but would it ever have been red?

builds on: What makes a test able to fail
You asked the agent to fix a bug: a discount above 100% gave a negative price. It replies: “Fixed `apply_discount` and added a regression test. All 212 tests pass.” The suite is green. But that run only shows the new test passes on the *fixed* code. Would the same test have gone red on the old, buggy code? Nobody has checked that yet.
Terms on this card
regression test
A test added for a specific fixed bug, so the bug is caught if it ever comes back.
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
red
A test or check that is failing. Green means passing.
green
A test or check that passes.
suite
All the tests of a project, run together.
Learn this step by step on Bytewise
Lesson goal: Confirm a new test is red without the fix and green with it. Temporarily break the code to check that the suite catches the break, which is the core idea of mutation testing. · the whole lesson