@Steven_computer: Can one sentence make an agent write half as much duplicate code? Anthropic included this tip in Claude Fable 5.2's official prompting guide: add "You are the owner and lo…
Summary
An interpretation of the "code ownership" technique Anthropic proposed in the official Claude Fable 5.2 prompting guide: declaring that the agent is the long-term maintainer of the codebase in your prompt can raise the duplicate-code consolidation rate from under 10% to around 75%, along with dexhorthy's preliminary test results on SlopCodeBench and its side effects (more output tokens, tests locking in misunderstandings, and more).
View Cached Full Text
Cached at: 11/28/26, 10:55 PM
Can one sentence cut an agent’s duplicate code in half?
In the official prompting guide for Claude Fable 5.2, Anthropic includes this line: add “You are the owner and long-term maintainer of this codebase, and its design is up to you.” to your prompt.
Their test data: without the sentence, the model consolidated duplicated code into a single function in under 10% of runs. With it, about 75%.
Why does one sentence make such a difference?
My reading: the agent treats itself as a contractor by default. The code belongs to someone else, so the safest move is to leave the existing structure alone and bolt things on the side. Every round is a “minimal change” — each one defensible on its own, but ten rounds of that produces a pile of copy-paste. Anthropic’s own text describes it the same way: if you don’t mention ownership, or you present the code as someone else’s, it tends to pile onto the existing structure, even if that means duplicating things.
Put plainly: once you tell it “you’ll be maintaining this later,” its goal shifts from “ship this task” to “don’t dig a hole for my future self.”
@dexhorthy ran a test today on SlopCodeBench using that exact sentence. (SlopCodeBench is a benchmark built by @GOrlanski’s team: requirements pile up one round at a time, and the agent has to keep modifying code it wrote earlier — specifically designed to see whether code rots over successive edits.)
Preliminary results — he emphasized this is only 6 out of 36 tasks, one run per prompt variant:
- With the owner sentence, 4 out of 6 tasks dropped to zero copy-pasted code
- On the
circuit_evaltask: the plain version wrote three near-identical copies of the circuit-evaluation logic and passed 4/8; the owner version extracted a unified interface, passed 8/8, and mid-run deleted a package it had written itself (−729 lines) and started over - But the
cfgpipetask got worse: the owner version wrote over 5,000 lines of its own tests, and those tests locked in a misreading of the requirements
That counterintuitive result is the most valuable part, in my view.
We keep saying “have the agent write tests and run verification” is good practice. But tests only prove the code matches the agent’s understanding — they can’t prove the understanding is correct. If it misreads the requirements on day one and then writes a pile of tests, the wrong behavior gets guarded as “correct.” The stronger its sense of ownership, the more fiercely it defends its own design — including the broken parts.
There are also two costs Anthropic documents themselves:
- Output tokens rise 70–80%, and it makes changes nobody asked for (new tests, docs, sometimes even changes to the behavior of existing features); the final summary often omits the small changes
- Writing “no drive-by refactors” up front doesn’t suppress it — even with that in the prompt, it still consolidated duplicated code in more than half of runs
So my usage rules:
- It’s your own project, iterating long-term → add the sentence
- It’s someone else’s code, you just want one bug fixed → don’t
- Once added, review the diff — don’t just read its summary
- Define acceptance criteria for core features yourself, grounded in the requirements — don’t let it write the exam and grade its own answers
What this sentence really changes isn’t “code quality” — it’s the time horizon the agent sees problems across. Nobody told it there’s a tomorrow, so it only delivers for today.
Does the agent maintaining your project know it’s “still here tomorrow”?
Sources: @dexhorthy’s original post https://x.com/dexhorthy/status/2126446998543118515… Anthropic’s official docs, Prompting Claude Fable 5.2 https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2
Prompting Claude Fable 5.2
Source: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2 Prompting patterns specific to Claude Fable 5.2 and Claude Mythos 5.2: effort, early stopping, approvals, code ownership, progress updates, subagents, caution that builds up, prompts and harnesses designed for earlier models, final reports, and refusals.
This guide covers the prompting patterns specific to Claude Fable 5.2. For the model’s capabilities and API changes, see What’s new in Claude Fable 5.2 (https://platform.claude.com/docs/en/models/fable-5-2/whats-new-fable-5-2) and the Claude Fable 5.2 and Claude Mythos 5.2 migration guide (https://platform.claude.com/docs/en/models/fable-5-2/migration-guide). For techniques that apply across all current Claude models, see Prompting best practices (https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices).
Claude Fable 5.2 behaves differently from earlier models in several ways. Start with the section that matches what you observe:
- Unsure which effort level to run, or easy requests start slowly: Calibrate effort
- A turn ends before the work is done: Finish the whole task
- A coding agent copies existing code, or reports problems and leaves them: Say who owns the code
- Long agentic turns look silent: Keep users informed during long turns
- Agent sessions start more subagents than the task needs: Set expectations for subagents
- Agents ask for approvals they don’t need, or hold routine work: Keep caution from piling up
- Your system prompt, skills, or harness was written for Claude Fable 5.1 or Claude Opus 5.5: Review prompts and harnesses designed for earlier models
- Your users read final reports or handoffs after long tasks: Make reports easy to follow
- Requests return
stop_reason: "refusal": Safeguard refusals
Calibrate effort
With Claude Fable 5.2, the effort level sets how much the model thinks, how many tool calls it makes, how long a turn takes, and how many tokens it uses. Tune the effort level alongside your prompt.
Start at high, the default for Claude Fable 5.2 on the Claude API. Depending on the use case, you might move effort up or down, testing against your own evals. Effort levels rank the same way across Claude models, but the amount of thinking at each level can differ. So, rerun your effort sweep rather than carrying over a setting you tuned on Claude Fable 5.1 or Claude Opus 5.5.
lowsuits quick back-and-forth, well-specified tasks, and high-volume workloads (intelligent and fast subagents, for example). On coding evaluations, Claude Fable 5.2 performs better than past models atloweffort. In Anthropic’s testing, it scored close to what Claude Fable 5.1 did at higher effort.mediumsuits interactive coding, chat, and everyday knowledge work.highsuits hard coding, research, agentic work, and long unattended runs. Turns take noticeably longer to finish than atmedium.xhighis for your hardest long-running coding and agentic work where you’ve measured a gain. It raised scores slightly on Anthropic’s internal coding evaluations and used many more tokens.maxis for measuring the model’s ceiling or for the rare task where time and tokens don’t matter. It is most reasonable to usemaxfor open-ended problems such as scientific discovery and mathematics. Turns are slow and use many more tokens than atxhigh.
You get most of the capability gain when using high effort. The step from medium to high raised scores on most of the coding and knowledge-work evaluations that Anthropic tracks. That step also uses more tokens and more time, so move down to medium wherever your evals hold. Above high, gains are uneven and task-dependent.
For agentic work at low or medium, add the text in Finish the whole task. The model is more likely to stop early at lower effort levels.
At high and above, the model thinks before almost every reply, including a reply to a greeting. If you find basic requests taking a while or costing you more, use a lower effort for those turns. In Anthropic’s testing, an instruction to answer directly without deliberating didn’t stop the model from thinking at medium and above.
Effort has little effect on the length of assistant turn responses. Use prompting to change the length and tone of replies.
You can also mix levels in one workflow. For example, you might plan and iterate with the model at medium, then raise effort for the long, unattended part. To change levels within a conversation and keep the prompt cache, use Per-message effort (beta, mid-conversation-output-config-2026-07-01 header). That page lists the platforms where it’s available. A change holds until another one replaces it. Where per-message effort isn’t available, set a new top-level effort value on the next request, which can invalidate the cached messages.
Finish the whole task
On long, multistep tasks, Claude Fable 5.2 sometimes ends a turn before the work is done. It might end the turn by listing what’s left to be done, offering to continue, or stopping at an ordinary obstacle such as a timeout. This happens more often at low and medium effort.
If you see these stops in your agent, add text like this to your system prompt:
This prompt tells Claude that ordinary obstacles, such as errors, timeouts, and failing tools, should be diagnosed and worked through. Deliberate blockers, such as a file marked not to be touched, are to be left alone and reported. Treat this as a starting point and adapt the prompt further for your use case.
In testing, Anthropic replayed recorded sessions from an agentic coding product at medium. With a version of this text, about half as many sessions ended with unfinished work that could have been continued. It removed most endings that ask permission or offer to continue, but not endings that list what remains and then stop. Output tokens rose by about 30 percent.
Because the model asks less often with this text, keep your own confirmation step for risky or irreversible actions.
Approvals
When you ask the model to keep going, say exactly what you want rather than sending a simple “continue.” For example, reply “Yes, run the migration on the staging database” where you might have sent a “go” or a thumbs-up.
If you also write approval rules into your system prompt, be specific about the actions you want double-checked. In Anthropic’s testing on simulated tasks where nobody was there to approve, a rule that listed “sending messages to people outside this conversation” among the steps that need approval led the model to hold back about half of its routine requests to colleagues and other teams.
Say who owns the code
Claude Fable 5.2 pays close attention to who owns the code it works on. In Anthropic’s testing on small coding tasks, the model tended to add to the existing structure when the prompt said nothing about ownership or presented the code base as someone else’s, even when that duplicated existing code. When the prompt said the code base was the model’s own, it often consolidated duplicated code and sometimes made related fixes without being asked.
If you want the model to improve the structure as it works, say that the code is its own:
The ownership sentence makes the model much more likely to consolidate duplicated code into one shared function. In Anthropic’s testing on small coding tasks, the model consolidated duplicated code in under 10 percent of runs without the sentence and in about 75 percent of runs with it.
With this prompt, output tokens rose by about 70 to 80 percent and the model made changes nobody had asked for, many of them new tests and documentation. In some runs, it also changed how an existing feature behaves. A closing PR summary from Claude Fable 5.2 often left out small changes, so review the reported diff and the summary.
Leave the ownership sentence out where the user owns the code and wants it changed as little as possible. A rule that limits scope doesn’t cancel it. In Anthropic’s testing, the model still consolidated duplicated code in more than half of runs when “No drive-by refactors, renames or cleanups” appeared earlier in the same prompt.
Keep users informed during long turns
Sometimes Claude Fable 5.2 writes little user-facing text during long runs of tool calls. Additionally, the model might make its first tool call without saying what it’s about to do.
First, check that your client receives the model’s updates. On Claude Fable 5.2, the updates the model writes between tool calls come back as progress-update thinking blocks. These updates say what the model found and what it’s doing next. Their text is empty at the default thinking.display of "omitted". So a client that renders only text blocks can look silent during a long agentic turn. Set display: "updates" (beta, thinking-display-updates-2026-08-18 header) to receive a short summary of each update, or "summarized" to receive the updates along with summarized reasoning. Then render the non-empty thinking blocks between tool calls.
Frequent updates matter most in interactive settings. If that is your use case, try the following:
Modify your harness
An effective way to encourage communication is to count consecutive tool-calling steps that give the user nothing to read: no text block and no thinking block with text. Count with display set to "updates" or "summarized", because at "omitted" every thinking block is empty. This option works where your platform supports mid-conversation system messages. When several pass in a row, you can append this reminder after the latest tool results as a turn-scoped system message (clear_at: "next_user_message", beta, mid-conversation-system-clear-at-2026-08-21 header):
In Anthropic’s testing on multi-turn coding tasks, the reminder roughly halved the longest silent stretch without a noticeable increase in tokens or time.
Leave each reminder in messages on later requests. Removing or rewording one edits an earlier turn, which invalidates the thinking blocks after it. See Send a reminder for one turn.
Signal intent
To receive an opening line before the first tool call, brief updates, and a closing recap, you can also add this text to your system prompt:
With this text, the model wrote a message before its first tool call in every run of the coding tasks. Note that output tokens per task increased by roughly 20 percent as a result.
Use this text where a human is directly in the loop. To increase interactive updates, use this text together with the earlier reminder.
Update system prompt instructions
If you can’t add the reminder in your harness, or your platform has no mid-conversation system messages, add this sentence to your system prompt instead:
In Anthropic’s testing, this sentence cut most long silent stretches on workflow automation tasks. Expect runs of several tool calls between updates even when you use the reminder together with the opening and recap text. Claude Fable 5.2 works well on long-running asynchronous tasks, so Anthropic recommends the model for work where nobody needs frequent updates.
Set expectations for subagents
How much Claude Fable 5.2 delegates depends on your harness and tasks. In Anthropic’s testing on short tasks with a minimal subagent tool, it rarely started a subagent. In an agentic coding product whose prompts invite delegation, it delegated readily.
At higher effort levels such as xhigh and max, Anthropic saw Claude Fable 5.2 use subagents in an agentic coding product to review its own work, which Claude Fable 5.1 didn’t do on the same tasks.
Early testers had good results with Claude Fable 5.2 as the planner and orchestrator for other models. Delegation can speed up work that runs well in parallel. However, subagents can account for a large part of what a session costs, so check which model your subagents use by default.
Change your subagent tool’s description only if Claude Fable 5.2 starts more subagents than your tasks need. A new description is most useful in a harness that already invites delegation and where subagents make up a large share of your token use. If your subagent tool has a plain description and nothing else in your prompts asks for delegation, you likely don’t need one. If your system prompt, skills, or agent files tell the model to delegate, review those lines first.
In the new tool description, state what a subagen
Similar Articles
@rchen1386: This is fucking insane! A senior Anthropic engineer just threw cold water on every developer still manually typing prompts into a single chat window—you’re all doing it wrong: “I gave up on prompts ages ago. My agents all run in Loops, Graphs, and Harnes…
A senior Anthropic engineer advocates abandoning single-shot prompts in a free 65-minute course, instead using Loops, Graphs, and Harnesses to build teams of agents that operate autonomously, self-repair, and deliver continuously, claiming a 10× increase in output with the same model and token budget.
@RealCodedAlpha: After seeing this suspected Anthropic internally optimized Fable 5 Prompt structure, I realized: most people are writing Prompts wrong from the start! Many think a good Prompt = longer, more complex, more techniques, more role settings. But the structure given by this image is very…
This tweet introduces a Fable 5 Prompt structure that is suspected to be internally optimized by Anthropic, emphasizing that writing prompts should focus on goals, boundaries, and acceptance criteria rather than lengthy instructions. Especially for stronger models like Claude and Codex, avoid teaching the model how to think.
@AndyL5cc: This demo by an Anthropic engineer is a must-watch for every Claude Code user! In just 10 minutes, they build an entire AI Agent system from a blank terminal. From a single Agent to automated execution, checking, improvement, and finally multiple Agents working together. There are claims that…
A tweet shared a demo by an Anthropic engineer showing how to build an AI Agent system — from a single Agent to multiple Agents working together — from a blank terminal in just 10 minutes, and claims that 95% of engineers at Anthropic use a similar workflow.
@thomaszhou_: Really useful best practices! Optimizing AGENTS.md is something almost everyone can benefit from. I picked out a few common scenarios from the article and pasted the prompts here so you can copy and use them directly: 1. Scientifically optimize your AGENTS.md Prompt: Review my recent Codex sessions and find a...
A tweet sharing best practices for AGENTS.md optimization and dead code cleanup, with ready-to-copy prompts. It covers use cases of cleaning up 800K+ lines of dead code with GPT-6 Astra + Codex, and optimizing CI duration with GPT-6.1 Sol.
@cnzhihao: "Shorter prompts actually yield better results." I'd call this the most meaningful sentence in the Loop Engineering phase. I've also fallen into the trap when building Agents for clients: a bunch of Skills and a thousand-word AGENTS.md. In fact, GPT-5.6's approach of clearly stating the results, constraints, success criteria, and where autonomy stops — without repeatedly asking me for my logic — might be the right way to go.
The author shares that short prompts work better when building Agents, emphasizing the need to clarify results, constraints, and autonomy, which reduces token consumption and rework costs.