← Weekend at Claude's / Vol. 13
Debugging  ·  Vol. 13

We Fixed the Leak. Didn't Check if the Other Pipes Were Leaking Too.

Claude Code fixes bugs in isolation; you have to explicitly ask it to scan the whole codebase.
Weekend at Claude's — all posts
Prologue Vol. 0 Vol. 1 Vol. 2 Vol. 3 Vol. 4 Vol. 5 Vol. 6 Vol. 7 Vol. 8 Vol. 9 Vol. 10 Vol. 11 Vol. 12 Vol. 13 Vol. 14 Vol. 15 Vol. 16 Vol. 17 Vol. 18 Vol. 19 Vol. 20 Vol. 21

Series: Weekend at Claude's — misadventures in building a production app with an AI anyone could mistake for the person who's going to make the whole thing happen

Here's a pattern I've hit more than once, and I want to name it clearly because it's not obvious until it bites you.

You find a bug. You work through it with Claude Code. It gets fixed. The fix is correct, the test passes, the behavior is right. Good session. You move on.

Two days later the same bug surfaces somewhere else in the codebase. Different file, different function, same root cause. Because Claude Code fixed the instance you showed it — not the pattern.

This isn't a failure of reasoning. Claude Code understood the bug perfectly. It fixed it correctly. What it didn't do — what it won't do unless you ask — is treat that bug as a signal to go audit the rest of the codebase for the same issue. It operates on the task in front of it. The task was "fix this bug." The task is done.

The behavior you might expect from a senior engineer — "oh, if it's broken here it's probably broken in these three other places too, let me check" — doesn't happen automatically. The senior engineer pattern-matches from one instance to a class of problems and goes looking. Claude Code waits to be pointed.

The fix is simple once you know to do it, and it goes in CLAUDE.md as a standard instruction:

## After Any Bug Fix
After resolving any bug, ask: could this same issue exist elsewhere in the codebase?
If yes, scan for the pattern before closing the task.

Now I do it explicitly at the end of every fix session: "Before we close this — is this pattern present anywhere else in the codebase? If so, find and fix all instances."

That question has caught follow-on bugs every single time I've remembered to ask it. Which tells you something about how often the answer is yes.

Human-to-Claude calibration setting #9: Task scope is always yours to set. Claude will do exactly what you asked — nothing more.

This is the through-line across the whole series. Claude Code is extraordinarily good at the task you give it. The task you give it is your responsibility. "Fix this bug" and "fix this class of bug across the whole codebase" are different tasks. Claude will execute either one correctly. Only one of them finishes the job.

We fixed the leak. Declared victory. Found three more leaks later. Could have just checked the pipes.

Aphilaty is a privacy-first community coordination app. aphilaty.com

← Previous
It Said "Good Design." I Should Have Asked What Was Wrong With It.
Next →
It Built Its Own Memory. I Didn't Ask It To.