My AI agent diagnosed its own bug. The diagnosis was plausible, specific, and wrong. A developer's AI agent misdiagnosed a Core Web Vitals issue on their blog, attributing a layout shift (CLS 0.303) to missing image dimensions when in fact 91% of images had incorrect dimensions. The developer emphasizes that a wrong diagnosis can be more costly than no diagnosis, as it misdirects attention, and advocates for measuring before fixing and labeling inferences in logs. Article pages were shifting during load. Lighthouse reported CLS 0.303 , where anything above 0.1 counts as poor. My ops agent wrote the cause into its log: Article pages CLS 0.303, caused by .prose img missing width / height . Fixing requires fetching intrinsic dimensions for 125 images — separate task. That diagnosis looks entirely correct. Images without declared dimensions give the browser nothing to reserve space with, so content jumps when they load. It's the canonical cause of layout shift; every article about CLS leads with it. When I sat down to fix it the next day, I did one thing first: I counted how many images were actually missing dimensions. The answer was 4 . The other 155 already had them. Not in the physics — image dimensions genuinely do affect CLS. It went wrong by applying a familiar cause without checking the scene. The real problem: those 155 images had dimensions, and the dimensions were wrong . These posts were written in 2017. The HTML looks like this: