Claude Fable 5.2 Avoids Refactoring
Anthropic's guides for Claude Fable 5 and 5.1 gave prompts to stop unasked code changes. Its Fable 5.2 guide gives a line to start the model refactoring.

| Model | Launched | Code beyond the task, in Anthropic's guide |
|---|---|---|
| Claude Fable 5 | Jun 2026 | Could refactor unasked at higher effort: the guide gives a prompt "to prevent unrequested tidying or refactoring at higher effort" |
| Claude Fable 5.1 | Sep 2026 | Might fix nearby code: "it might fix nearby code, extend behavior the task didn't mention" |
| Claude Fable 5.2 | Nov 2026 | Tended to leave code alone: it "tended to add to the existing structure, even when that repeated existing code" |
| Prompt in Anthropic's test of Claude Fable 5.2 | Tries where it refactored duplicate code |
|---|---|
| Without the line | Under a tenth |
| With the line | About half |
| With the line and a "No drive-by refactors, renames or cleanups" rule | About a third |
Anthropic's prompting guide for Claude Fable 5.2 says the model tends to leave existing code as it is unless the prompt says the code is the model's own. The model launched on Nov 9. Anthropic's guides for Claude Fable 5, launched on Jun 9, and Claude Fable 5.1, launched on Sep 1, each gave developers a prompt to stop those models changing code beyond the task.
Earlier guides told developers how to stop it
The Fable 5 guide gives a prompt "to prevent unrequested tidying or refactoring at higher effort". The prompt opens: "Don't add features, refactor, or introduce abstractions beyond what the task requires." The Fable 5.1 guide says that model "delivers what's asked for and sometimes more: it might fix nearby code, extend behavior the task didn't mention, or commit more test files than the change warrants". Its prompt tells the model to report such a find as a follow-up.
The guides don't compare the three models on one test. Only the Fable 5.2 guide reports a test with rates, and Anthropic doesn't give a figure for the earlier models on it.
One line took refactoring from under a tenth to about half
Anthropic tested Fable 5.2 on small coding tasks. When a prompt said nothing about ownership or presented the code as someone else's, the model "tended to add to the existing structure, even when that repeated existing code". It also tended to report nearby problems instead of fixing them.
The line Anthropic suggests reads: "This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it." With it, the model "merged repeated code in about half of the tries". Without it, the model did so in under a tenth. The guide sets merging repeated code against adding "to the existing structure, even when that repeated existing code", and this story calls it refactoring. The rate varied by task, and the result held when the line stood inside a long system prompt. The requested feature worked in nearly every try either way.
A rule against refactors didn't cancel the line
Anthropic also put "No drive-by refactors, renames or cleanups" earlier in the same prompt. The model still refactored duplicate code in about a third of the tries.
The line had other effects in the same testing. The model used about 1.5 times the output tokens and made several changes that nobody had asked for, "many of them new tests and documentation". Apart from bug fixes, it changed how an existing feature behaves in one try in six to ten, and more often at higher effort. Its closing summary often left out small changes. The guide says to leave the line out where the user owns the code and wants it changed as little as possible. It doesn't name the tasks or say how many tries Anthropic ran.
The model's prices per token are in Claude Fable API Prices, Fable 5 to 5.2.
Sources
- Anthropic, developer documentationplatform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2
- Anthropic, developer documentationplatform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1
- Anthropic, developer documentationplatform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5
- Anthropic, Nov 9, 2026Introducing Claude Fable 5.2 and Claude Mythos 5.2
- Anthropic, Jun 9, 2026Claude Fable 5 and Claude Mythos 5
- Anthropic, release notesplatform.claude.com/docs/en/release-notes/overview