# Ask why until the root answers

> The first answer to "why did it break?" is usually a symptom. Keep asking until the answer is a cause you can actually fix.

Source of the line: The five whys, from the Toyota Production System. Essay by Cosmin Cojocar. Theme: engineering. URL: https://cosmin.dev/creative-thinker/ask-why-until-the-root-answers/

A bug report says the export failed. Why? The file was empty. Why? The job ran before the data arrived. Why? Nothing waits for the upload to finish. Why? The pipeline assumes uploads are instant. Why? Because they were, until files got bigger.

Each answer is true. Only the last one is worth fixing. Patch the empty file and the bug comes back next month in a different shape. Fix the assumption and a whole family of bugs disappears.

The five whys is a simple discipline from manufacturing: keep asking until the answer stops being about this incident and starts being about how the system works. Five is not a magic number. Stop when the next "why" no longer leads anywhere you can change.

## Try this

For the last bug you fixed, write the chain of whys down. If your fix sits at the first or second step, add one more change at the root, or a test that would catch the whole family.
