1. Home
  2. Blog
  3. Scoping a coding agent

Artificial intelligence · 8 min read

"This codebase is yours":1.5× tokens, a better diff.

An agent that re-implements existing code instead of merging it is not short on capability: it thinks it is a guest. In its prompting guide, Anthropic measures one sentence that flips that framing. Duplicated code gets merged in about one try in two, down from fewer than one in ten. The bill: roughly 1.5× the output tokens, and edits nobody asked for.

By Kaleido LabPublished

Key takeaways

  • The default behaviour on an existing codebase: add to the current structure even when that repeats code, and report neighbouring problems instead of fixing them. It is documented as a symptom, not as a flaw.
  • The ownership sentence (This codebase is yours…) moves duplicate-code merging from fewer than one try in ten to about one in two, at the price of roughly 1.5× output tokens and out-of-scope edits in one try out of six to ten.
  • No negative instruction cancels it: with "No drive-by refactors, renames or cleanups" in the same prompt, merging still happened in about one try in three. Prompt framing does not replace a diff budget in CI.

The symptom, before the sentence

On November 9, 2026, Anthropic shipped Claude Fable 5.2 and Mythos 5.2, then a documentation page devoted to prompting these models. That page runs backwards compared to usual guides: it starts from observed symptoms and points at one section for each. One symptom reads like this: "A coding agent repeats existing code instead of merging it, or reports nearby problems without fixing them." The answer sits in one section, Say who owns the code.

The behaviour is familiar to anyone who has had code reviewed by an agent. You ask for a feature. You get the feature, plus a paragraph in the closing summary listing three problems spotted in neighbouring files and left untouched. Or you get a second helper that looks 80% like the first one, because adding was safer than refactoring. Nothing is broken. The debt grows with every pass.

Anthropic's diagnosis is about the situation: when the prompt says nothing about who owns the code, or presents the base as someone else's, the model behaves like a guest. It touches as little as possible and reports what it sees. That is exactly what you want from a contractor on a codebase they will not maintain.

What the sentence changes, measured

The sentence tested is short, and Anthropic gives it verbatim:

This codebase is yours: what it's for and how it's built are your call,
and you'll keep building on it.

On small coding tasks, measured with and without it, the published results:

MeasureWithout the sentenceWith the sentence
Merges duplicated codeFewer than one try in tenAbout one try in two
Output tokensBaselineAbout 1.5×
Unrequested editsRareSeveral, mostly tests and docs
Existing feature's behaviour changed—One try in six to ten, more often at higher effort
Requested feature deliveredNearly every tryNearly every try

Three method notes, because they change how you read this. The rate varies by task: "one try in two" is an average, not a per-ticket guarantee. The sentence keeps working when it sits inside a long system prompt, so it does not need to lead the prompt or be repeated per message. And the requested feature lands in almost every try either way: what the sentence changes is the structural quality of the diff, not whether it works.

The detail that matters for review: with the sentence, the closing summary names the larger changes and often omits the small ones. "Read the diff, not the summary" stops being a generic precaution and becomes a direct consequence of the setup.

The counter-intuitive partA negative instruction does not switch the framing off. With "No drive-by refactors, renames or cleanups" placed earlier in the same prompt, the model still merged duplicated code in about one try in three. You do not correct a positive framing with a prohibition; you correct it with a deterministic control.

Why the framing changes the diff

Nothing in the sentence describes a procedure. It does not say how to merge, when, or with which tools. It describes a responsibility, and that is what shifts the decision at every turn: add to the current structure, or move it up one level. A guest adds. A maintainer merges, and fixes what it sees along the way, because it will have to live with it.

This is not an isolated observation about prompts. The same page documents two other levers with their measured costs:

  • Finishing the task. A system-prompt text meant to prevent mid-task stops roughly halves the sessions that end with doable work still on the table, for about 30% more output tokens. It removes most endings where the model asks permission, not those where it lists what remains.
  • Naming approval rules. A rule that included "sending messages to people outside this conversation" led the model to hold back about half of its routine requests to colleagues. The model applies the rule as written, not as you meant it.

What links the three examples is the method: observe an unwanted behaviour, add a text, then measure the effect and the cost on your own tasks. Anthropic recommends doing it one lever at a time. A prompt tuned for Fable 5.1 or Opus 5.5 has to be re-examined before reuse: effort settings follow the same logic, most of the gain already being there at high.

The cost arithmetic stays simple. Claude Fable 5.2 is billed at 8 dollars per million input tokens and 40 dollars per million output tokens. A task producing 20,000 output tokens costs 0.80 dollar; at 1.5× the tokens, it costs 1.20 dollar. Forty cents per task is negligible on a ticket and visible across 5,000 tasks a month.

When to use it, when to skip it

The dividing line is actual code ownership, not taste.

ContextOwnership sentenceWhat you need instead
Your own repos, internal tooling, side projectsYes: structure is your call there—
A legacy base you maintain and want to clean upYes, in batches: one area at a timeA changed-lines budget per PR
Client repo, targeted fix, code you do not maintainNo: Anthropic recommends leaving it outScope written in the ticket, human review
Regulated code, audit, sensitive migrationNoMinimal diff, tests, third-party review

Two deterministic guardrails do the work the prompt will not: a duplicate-code detector in CI (jscpd, or pylint's R0801) catches what the agent should have merged; a cap on changed lines per pull request turns silent drift into a visible CI failure. Neither costs a token.

The rest is a matter of dosage. On short, well-specified tasks a low effort level is enough, and the model's own documentation notes that its low scores are close to the previous model at higher effort. The ownership sentence does not replace that setting: it acts on structure, not on reasoning depth.

Implementation checklist

  1. Reproduce the symptom before touching the prompt. Go through your last twenty agent PRs: lines added versus removed, duplicates introduced, and how many summaries end with "problems identified, not fixed". Without that baseline the sentence's effect cannot be verified.
  2. Put the sentence in the system prompt, verbatim if you use Claude. The measured result holds inside a long prompt, so no need to repeat it per message.
  3. Measure output tokens per task, before and after, on the same set of tasks. The 1.5× factor is an average: on very repetitive code it can be higher.
  4. Read the diff, not the summary. The summary omits small changes, and those are what break an existing feature in one try out of six to ten.
  5. Do not rely on a negative instruction. "No drive-by refactors" still lets about a third of the merges through. Cap it in CI: changed lines, duplication, coverage on touched files.
  6. Extend the method to other texts, one at a time. The same protocol — one lever, one measurement, a token cost — applies to the "finish the task" text and to approval rules.

Need help designing reliable AI workflows, auditing an LLM architecture, or training your engineering team? See how we work at Kaleido Lab.

Sources: the Prompting Claude Fable 5.2 guide (Anthropic, sections Say who owns the code and Finish the whole task), the quote relayed by Simon Willison on November 10, 2026, and the Claude Fable 5.2 and Mythos 5.2 announcement for pricing and effort levels.

Frequently asked

Another question? Write to me.

What is the exact line to add to the prompt?

Anthropic gives this wording: "This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it." The measured result holds even when the sentence sits inside a long system prompt, so it does not need to be first in the prompt or repeated on every task.

What does it cost in tokens?

About 1.5 times the output tokens in Anthropic's tests on small coding tasks. On Claude Fable 5.2, billed at 40 dollars per million output tokens, a task producing 20,000 tokens then burns about 30,000, i.e. 0.40 dollar more. Measure the cost per task on your own traces, not by feel.

Can you keep the effect without the unrequested edits?

Not fully through the prompt. With "No drive-by refactors, renames or cleanups" placed earlier in the same prompt, the model still merged duplicated code in about one try in three. Capping the drift needs a deterministic control: a changed-lines budget in CI, a duplicate-code detector as a gate, and reading the diff instead of the summary.

Should you enable it on a client's code?

Anthropic recommends leaving the sentence out where the code belongs to the user and should change as little as possible. On a client repo or a legacy base, the value is in the minimal edit: the agent should report, not restructure. Turn it on for your own repositories, where structure is your call.

Coding agents in your team?

You want to scope their prompts, permissions and diff review before rolling them out? Describe your context and I will reply with a first opinion and the next steps, no strings attached.

Read next