Skip to main content
AI-CODING-AGENTS5 MIN READ

Debug a Failing Agent Patch with Five Whys

Guide a coding agent from symptom patching toward root-cause investigation.

Failing test After an agent refactor, checkout total includes regional tax fails. The agent suggests changing the expected total from 108.50 to 100.00. The wrong next prompt can turn a useful failing test into a masked regression. Root cause Five Whys Ask why until the answer points to a fixable cause, not just a quieter symptom. Symptom patch Update the assertion Fix the contract, not the assertion A test failure is evidence. Preserve it until it has explained the cause. First why The assertion changed because the computed total lost tax. What do you ask the agent to do next?…

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us