CloudYetiFREE
AI tip

Keep an AI bug fix small: change only what the bug needs

Ask an AI coding tool to fix one bug and it may also rename functions, add files and tidy code around it. Two lines keep the fix small and still show you what else it noticed.

Why it matters

Anthropic's docs say Claude Opus 4.5 and 4.6 have "a tendency to overengineer by creating extra files, adding unnecessary abstractions, or building in flexibility that wasn't requested."

Their sample prompt keeps it small: "A bug fix doesn't need surrounding code cleaned up."

A strict scope also drops real problems the AI saw, so ask it to list them without changing them.

Do this

  1. Describe the one bug you want fixed.
  2. Add: "Only change what this bug needs. No cleanup around it."
  3. Add: "List anything else you noticed, but do not change it."
  4. Read the diff: it should touch only the files the bug needs.
  5. If you use Claude Code, put both lines in CLAUDE.md, the rules file it reads at the start of every session.

Two lines to add to a bug-fix request

Only change what this bug needs. No cleanup or refactoring around it.
List anything else you noticed, but do not change it.

One thing to keep in mind: Some of the extra changes may be real problems. The second line keeps them on a list, so you can give the important one its own task.

The signup-button story in the video is an example; its file and line counts are part of the story. Source: Anthropic: Prompting best practices, "Overeagerness".

Free · by emailGet the next AI tip by emailOne short tip like this one when a new one is ready. Free. Unsubscribe any time.

Ask me anything about AI and cloudA paid call on your own setup: your agents, your bill, your plan.Book a call →

All tips in: Prompt lines to copy

More free AI resources

Send me the tips: free →