How to stop Claude from doing more than you asked

The pattern is familiar: you ask Claude to fix a bug. It fixes the bug, then refactors the function it was in, adds a helper, updates comments in adjacent code, and creates a utility it thinks you'...

By · · 1 min read
How to stop Claude from doing more than you asked

Source: DEV Community

The pattern is familiar: you ask Claude to fix a bug. It fixes the bug, then refactors the function it was in, adds a helper, updates comments in adjacent code, and creates a utility it thinks you'll need later. The original fix is buried somewhere in there. You wanted one thing changed and got a diff across five files. This happens because Claude's default is to be helpful, and helpful reads as thorough. It sees related improvements and makes them. Unsolicited changes are harder to review, harder to revert if something breaks, and accumulate into a codebase that drifts from what you intended. There's a specific prompt pattern that stops it. The minimal footprint instruction Minimal footprint. Change only what is necessary to complete the specific task. Do not refactor adjacent code. Do not add error handling that wasn't asked for. Do not create utility functions or abstractions preemptively. Do not update comments or documentation outside the scope of the change. If you see something