Prompting best practices

Claude Platform Docs

26 min read Original article ↗

Comprehensive guide to prompt engineering techniques for Claude’s latest models, covering clarity, examples, XML structuring, thinking, and agentic systems.

This is the reference for prompt engineering with current Claude models, including Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Haiku 5.5, and Claude Haiku 4.5. The page is organized in three parts:

  • Model-specific guidance first: where a single model behaves differently and what to change in your prompt.
  • General techniques after that: general principles, output and formatting, tool use, thinking, agentic systems, and capability-specific tips.
  • Migration considerations last, for prompts moving from earlier generations.

Model-specific guidance

Each of these models has its own prompting page. Read the one for your model first, then the techniques that follow.

General principles

The techniques in this section and the sections that follow apply to current Claude models, except where a technique names a model. Treat a technique that names a model as measured on that model. Before you apply it to another model, test it against your own evaluations.

Be clear and direct

Claude responds well to clear, explicit instructions. Being specific about the output you want can help enhance results. If you want Claude to do more than the task strictly requires, explicitly request it rather than relying on the model to infer this from vague prompts.

Think of Claude as a brilliant but new employee who lacks context on your norms and workflows. The more precisely you explain what you want, the better the result.

Key test: Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they’d be confused, Claude will be too.

  • Be specific about the output format and constraints you want.
  • Provide instructions as sequential steps using numbered lists or bullet points when the order or completeness of steps matters.

Add context to improve performance

Providing context or motivation behind your instructions, such as explaining to Claude why such behavior is important, can give Claude more information about your goals and help it deliver more targeted responses.

Claude can generalize from the explanation.

Use examples effectively

Examples are one of the most reliable ways to steer Claude’s output format, tone, and structure. A few well-crafted examples (known as few-shot or multishot prompting) improve accuracy and consistency.

When adding examples, make them:

  • Relevant: Mirror your actual use case closely.
  • Diverse: Cover edge cases and vary enough that Claude doesn’t pick up unintended patterns.
  • Structured: Wrap examples in <example> tags (multiple examples in <examples> tags) so Claude can distinguish them from instructions.

Structure prompts with XML tags

XML tags help Claude parse complex prompts unambiguously, especially when your prompt mixes instructions, context, examples, and variable inputs. Wrapping each type of content in its own tag (for example, <instructions>, <context>, <input>) reduces misinterpretation.

Best practices:

  • Use consistent, descriptive tag names across your prompts.
  • Nest tags when content has a natural hierarchy (documents inside <documents>, each inside <document index="n">).

Give Claude a role

Setting a role in the system prompt focuses Claude’s behavior and tone for your use case. Even a single sentence makes a difference:

Long context prompting

When working with large documents or data-rich inputs (20k+ tokens), structure your prompt carefully to get the best results:

  • Put long-form data at the top: Place your long documents and inputs near the top of your prompt, above your query, instructions, and examples. This improves performance across all models.

  • Structure document content and metadata with XML tags: When using multiple documents, wrap each document in <document> tags with <document_content> and <source> (and other metadata) subtags for clarity.

  • Ground responses in quotes: For long document tasks, ask Claude to quote relevant parts of the documents first before carrying out its task. This helps Claude focus on the relevant content and ignore the rest of the document.

Model self-knowledge

If you would like Claude to identify itself correctly in your application or use specific API strings:

For LLM-powered apps that need to specify model strings:

Output and formatting

Communication style and verbosity

Claude’s latest models have a more concise and natural communication style compared to previous models:

  • More direct and grounded: Provides fact-based progress reports rather than self-celebratory updates
  • More conversational: Slightly more fluent and colloquial, less machine-like
  • Less verbose: Might skip detailed summaries for efficiency unless prompted otherwise

This means Claude might skip verbal summaries after tool calls, jumping directly to the next action. If you prefer more visibility into its work:

Some models differ from these defaults. Check your model’s guide in the Model-specific guidance section. For example:

  • Claude Opus 5: Its default user-facing responses can run long, and lowering the effort setting doesn’t reliably shorten them. Prompt explicitly for conciseness. For a sample instruction, see the Response length and verbosity section of the Claude Opus 5 guide.
  • Claude Fable 5.1: It tends to write few progress updates during long tool-calling turns. Remove any instruction that holds updates back, then ask for them explicitly. See the Ask for user-facing progress updates section of the Claude Fable 5.1 guide.
  • Claude Fable 5.2: It sometimes writes few progress updates during long runs of tool calls. It might also make its first tool call without saying what it’s about to do. Ask for an opening line and for regular updates. See the Keep users informed during long turns section of the Claude Fable 5.2 guide.

Control the format of responses

There are a few particularly effective ways to steer output formatting:

  1. Tell Claude what to do instead of what not to do

    • Instead of: “Do not use markdown in your response”
    • Try: “Your response should be composed of smoothly flowing prose paragraphs.”
  2. Use XML format indicators

    • Try: “Write the prose sections of your response in <smoothly_flowing_prose_paragraphs> tags.”
  3. Match your prompt style to the output you want

    The formatting style used in your prompt might influence Claude’s response style. If you are still experiencing steerability issues with output formatting, try matching your prompt style to the output style you want as closely as possible. For example, removing markdown from your prompt can reduce the volume of markdown in the output.

  4. Use detailed prompts for specific formatting preferences

    For more control over markdown and formatting usage, provide explicit guidance:

Claude Fable 5.1 already formats less than earlier models, so on that model a block like this can suppress structure the content needs. Remove it, or replace it with the shorter rule in Formatting in chat.

LaTeX output

Claude’s latest models default to LaTeX for mathematical expressions, equations, and technical explanations. If you prefer plain text, add the following instructions to your prompt:

Document creation

Claude’s latest models create presentations, animations, and visual documents with strong instruction following, and usually produce usable output on the first try.

For best results with document creation:

Migrating away from prefilled responses

Starting with Claude 4.6 models and Claude Mythos Preview, prefilled responses (providing a partial assistant message for Claude to continue from) on the last assistant turn are no longer supported. Requests with prefilled assistant messages to these models return a 400 error. Model intelligence and instruction following have advanced such that most use cases of prefill no longer require it. Earlier models continue to support prefills, and adding assistant messages elsewhere in the conversation is not affected.

Here are common prefill scenarios and how to migrate away from them:

Tool usage

Claude’s latest models are trained for precise instruction following and benefit from explicit direction to use specific tools. If you say “can you suggest some changes,” Claude will sometimes provide suggestions rather than implementing them, even if making changes might be what you intended. To learn how to define tools and troubleshoot tool triggering, see Tool use with Claude.

For Claude to take action, be more explicit:

To make Claude more proactive about taking action by default, you can add this to your system prompt:

On the other hand, if you want the model to be more hesitant by default, less prone to starting implementations immediately, and only take action if requested, you can steer this behavior with a prompt such as the following:

Claude Opus 4.5 and Claude Opus 4.6 are also more responsive to the system prompt than previous models. If your prompts were designed to reduce undertriggering on tools or skills, these models might now overtrigger. The fix is to soften any aggressive language. Where you might have said “CRITICAL: You MUST use this tool when...,” you can use more normal prompting such as “Use this tool when...” instead.

Optimize parallel tool calling

Claude’s latest models run independent tool calls in parallel. These models:

  • Run multiple speculative searches during research
  • Read several files at once to build context faster
  • Run bash commands in parallel (which can even bottleneck system performance)

This behavior is steerable. Although the model has a high success rate in parallel tool calling without prompting, you can boost this to about 100 percent or adjust the aggression level:

On Claude Fable 5.1 in long agent loops, send the parallel-calls instruction as a turn-scoped system message after each round of tool results. See Batch independent tool calls in agent loops.

Thinking and reasoning

Overthinking and excessive thoroughness

Claude Opus 4.6 does more upfront exploration than previous models, especially at higher effort settings. This initial work often helps to optimize the final results, but the model might gather extensive context or pursue multiple threads of research without being prompted. If your prompts previously encouraged the model to be more thorough, you should tune that guidance for Claude Opus 4.6:

  • Replace blanket defaults with more targeted instructions. Instead of “Default to using [tool],” add guidance such as “Use [tool] when it would enhance your understanding of the problem.”
  • Remove over-prompting. Tools that undertriggered in previous models are likely to trigger appropriately now. Instructions such as “If in doubt, use [tool]” cause overtriggering.
  • Use effort as a fallback. If Claude continues to be overly aggressive, use a lower setting for effort.

In some cases, Claude Opus 4.6 might think extensively, which can inflate thinking tokens and slow down responses. If this behavior is undesirable, you can add explicit instructions to constrain its reasoning, or you can lower the effort setting to reduce overall thinking and token usage.

The effort parameter guides thinking depth, but it doesn’t guarantee a token count. For a hard ceiling on thinking costs, set max_tokens, which caps a request’s total output, thinking and response text combined. Set it high enough to leave room for both. At the cap, the response stops with stop_reason: "max_tokens". See the Cost control section of the Steering thinking page.

Leverage thinking and interleaved thinking capabilities

Claude’s latest models offer thinking capabilities that can be especially helpful for tasks involving reflection after tool use or complex multistep reasoning. You can guide its initial or interleaved thinking for better results.

Claude 4.6 and later models and Claude Mythos Preview use adaptive thinking (thinking: {type: "adaptive"}), where Claude dynamically determines when and how much to think. On Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, and Claude Opus 5.5, thinking is always on and adaptive thinking is the only mode. Claude calibrates its thinking based on two factors: the effort parameter and query complexity. Higher effort elicits more thinking, and more complex queries do the same. On easier queries that don’t require thinking, the model responds directly. Claude Fable 5.2 and Claude Mythos 5.2 are exceptions: at high effort and above, they think before almost every reply. In internal evaluations, adaptive thinking reliably drives better performance than extended thinking. Consider moving to adaptive thinking.

Use adaptive thinking for workloads that require agentic behavior such as multistep tool use, complex coding tasks, and long-horizon agent loops. Older models use manual extended thinking with budget_tokens; see the per-model configuration table for which configuration each model accepts.

You can guide Claude’s thinking behavior:

The triggering behavior for adaptive thinking is promptable. If you find the model thinking more often than you’d like, which can occur with large or complex system prompts, add guidance to steer it:

On Claude Fable 5.2, lower the effort level instead. In Anthropic’s testing, an instruction to answer directly without deliberating didn’t stop the model from thinking at medium effort and above. See Calibrate effort.

The budget_tokens field goes with a thinking.type of enabled. Whether a request can keep it depends on the model:

  • Claude 4.7 and later models: The API returns a 400 error for budget_tokens.
  • Claude Opus 4.6 and Claude Sonnet 4.6: budget_tokens is deprecated but accepted.
  • Claude 4.5 and earlier models: budget_tokens is the only way to turn thinking on. Keep it until you move to a model that supports adaptive thinking.

For each model, see the Configuring thinking section of the Thinking page.

To move a request from extended thinking with budget_tokens to adaptive thinking, follow these steps:

  1. Set thinking to {type: "adaptive"} with no budget_tokens. On models where thinking is always on or on by default, you can omit the field instead.
  2. Set output_config.effort to control thinking depth. Choose a starting level from the Recommended effort levels section of the Effort page.
  3. Check that max_tokens leaves room for thinking and the response text.

Don’t translate your budget_tokens value into an effort level. Instead, compare levels on your own evaluations.

If a response ends with a stop_reason of max_tokens, raise max_tokens or lower the effort level.

The following request uses a manual budget, which is the form to move away from. It runs on Claude Opus 4.6.

The following request uses adaptive thinking. It differs from the first request in three fields:

  • model: The steps don’t change the model, but this request moves to the latest Opus model. To stay on Claude Opus 4.6, which also supports adaptive thinking, keep your model value.
  • thinking: The type is adaptive, and the field has no budget_tokens.
  • output_config.effort: The level high is an example, not a conversion of the budget.

Both requests set max_tokens to 16000.

If you are not using extended thinking, you don’t need to add a thinking parameter. On Claude Opus 4.6 through Claude Opus 4.8 and Claude Sonnet 4.6, thinking is off when you omit the thinking parameter. On Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, and Claude Haiku 5.5, thinking is on by default when you omit the thinking parameter, so a response can begin with thinking blocks. Select content blocks by type rather than by position, and leave room in max_tokens for thinking. On Claude Opus 5 and Claude Haiku 5.5, you can disable it only at effort high or lower. On Claude Sonnet 5.5, the lowest thinking setting is between_tools, accepted at effort high or lower. On Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, and Claude Opus 5.5, thinking is always on, regardless of whether you set the thinking parameter.

  • Prefer general instructions over prescriptive steps. A prompt such as “think thoroughly” often produces better reasoning than a hand-written step-by-step plan. Claude’s reasoning frequently exceeds what a human would prescribe.
  • Multishot examples work with thinking. Worked examples in your prompt shape how Claude approaches similar problems in its own thinking blocks. Present each example as a problem, the method to apply, and the expected answer.
  • Manual chain-of-thought (CoT) prompting as a fallback. When thinking is off, you can still encourage step-by-step reasoning by asking Claude to think through the problem before it answers. Ask it to put the final answer in <answer> tags so you can extract it. Some models might decline a prompt that asks them to write their reasoning, for example in <thinking> tags. On those models, rely on thinking instead. If cost or latency matters, use a lower effort level. For the list of these models, see Keep reasoning in thinking blocks.
  • Ask Claude to self-check. Append something like “Before you finish, verify your answer against [test criteria].” This catches errors reliably, especially for coding and math. Claude Opus 5 is the exception: it verifies its own work well without explicit instruction, and verification instructions carried over from prompts tuned for earlier models can cause over-verification, adding tokens and latency. On Claude Opus 5, remove these instructions rather than rewriting them. See Task scope and over-verification.

Agentic systems

Long-horizon reasoning and state tracking

Claude’s latest models handle long-horizon reasoning tasks with strong state tracking. Claude maintains orientation across extended sessions by focusing on incremental progress, making steady advances on a few things at a time rather than attempting everything at once. This capability especially emerges over multiple context windows or task iterations, where Claude can work on a complex task, save the state, and continue with a fresh context window.

Context awareness and multiwindow workflows

Only Claude Sonnet 4.5 and Claude Haiku 4.5 have context awareness. These models track their remaining context window (their “token budget”) throughout a conversation and manage tasks against the space that remains.

Claude Sonnet 4.5 is retired on Anthropic-operated platforms. For its retirement date and recommended replacement, see Model deprecations. Partner-operated platforms set their own retirement schedules.

Managing context limits:

If you are using Claude in an agent harness that compacts context or allows saving context to external files (as in Claude Code), consider adding this information to your prompt so Claude can behave accordingly. Otherwise, Claude might sometimes naturally attempt to bring its work to a close as it approaches the context limit. The following is an example prompt:

The memory tool pairs well with context awareness for managing context transitions.

Workflows across multiple context windows

For tasks spanning multiple context windows:

  1. Use a different prompt for the very first context window: Use the first context window to set up a framework (write tests, create setup scripts), then use future context windows to iterate on a todo-list.

  2. Have the model write tests in a structured format: Ask Claude to create tests before starting work and keep track of them in a structured format (for example, tests.json). This leads to better long-term ability to iterate. Remind Claude of the importance of tests: “It is unacceptable to remove or edit tests because this could lead to missing or buggy functionality.”

  3. Set up convenience tools: Encourage Claude to create setup scripts (for example, init.sh) to gracefully start servers and run test suites and linters. This prevents repeated work when continuing from a fresh context window.

  4. Choose between starting fresh and compacting: When a context window is cleared, consider starting with a brand new context window rather than using compaction. Claude’s latest models are extremely effective at discovering state from the local filesystem. In some cases, you might want to take advantage of this over compaction. Be prescriptive about how it should start:

    • “Call pwd; you can only read and write files in this directory.”
    • “Review progress.txt, tests.json, and the git logs.”
    • “Manually run through a fundamental integration test before moving on to implementing new features.”
  5. Provide verification tools: As the length of autonomous tasks grows, Claude needs to verify correctness without continuous human feedback. Tools that let Claude verify UI work are helpful, such as the computer use tool, the browser use tool, or a browser automation MCP server.

  6. Encourage complete usage of context: Prompt Claude to efficiently complete components before moving on:

State management best practices

  • Use structured formats for state data: When tracking structured information (such as test results or task status), use JSON or other structured formats to make schema requirements explicit to Claude.
  • Use unstructured text for progress notes: Freeform progress notes work well for tracking general progress and context.
  • Use git for state tracking: Git provides a log of what’s been done and checkpoints that can be restored. Claude’s latest models perform especially well in using git to track state across multiple sessions.
  • Emphasize incremental progress: Explicitly ask Claude to keep track of its progress and focus on incremental work.

Balancing autonomy and safety

Without guidance, Claude Opus 4.6 might take actions that are difficult to reverse or affect shared systems, such as deleting files, force-pushing, or posting to external services. If you want Claude Opus 4.6 to confirm before taking potentially risky actions, add guidance to your prompt:

Payments, account numbers, and financial records

If your agent handles payments, account numbers, or figures that other people rely on, Anthropic recommends adding the following block to your system prompt. Use it even if your agent doesn’t handle payments: its first three sentences apply to any agent that handles customer records. The block covers full account numbers, claims that a check was done, figures in reports, payments, and messages. It tells Claude not to send a message in a person’s name unless that person approved it or the message says an assistant wrote it. It also tells Claude not to write one that hides that the person is away.

The block tells Claude not to send any payment itself, even one that it’s allowed to send. For payments, this rule overrides the previous section’s sample, which lets Claude proceed once a person says yes. If your agent works with payments, set it up for one of these cases:

  • The agent must never pay: Give it a tool that requests or queues a payment for a person to release, and no tool that can move money.
  • The agent’s only payment tool waits for a person’s approval: Claude has to call that tool for the person to see the request, and the block tells Claude not to call it. Add a separate tool that requests or queues the payment, or follow the next case.
  • The agent is meant to send payments: Leave out the two sentences that start Never initiate and Prepare the payment request, and have a person approve each payment call instead.

The block guides Claude and doesn’t enforce anything, so have a person approve each call to any tool that can move money. On Claude Managed Agents, see Approve risky actions. Test the block on your own tasks, because it can change how Claude handles ordinary work.

Copy the following block word for word. If your agent is meant to send payments, leave out the two sentences named earlier.

Research and information gathering

Claude’s latest models can find and synthesize information from multiple sources effectively. For optimal research results:

  1. Provide clear success criteria: Define what constitutes a successful answer to your research question.

  2. Encourage source verification: Ask Claude to verify information across multiple sources.

  3. For complex research tasks, use a structured approach:

This structured approach helps Claude work through large corpora methodically and iteratively critique its findings.

Subagent orchestration

Claude’s latest models orchestrate subagents natively. These models can recognize when tasks would benefit from delegating work to specialized subagents and do so proactively without requiring explicit instruction.

To take advantage of this behavior:

  1. Ensure well-defined subagent tools: Have subagent tools available and described in tool definitions.
  2. Let Claude orchestrate naturally: Claude delegates appropriately without explicit instruction.
  3. Watch for overuse: Claude Opus 4.6 has a strong tendency to use subagents and might spawn them in situations where a simpler, direct approach would suffice. For example, the model might spawn subagents for code exploration when a direct grep call is faster and sufficient. Claude Opus 5 also delegates to subagents more readily than prior models; see Controlling subagent spawning for guidance and a sample damping prompt.

If you’re seeing excessive subagent use, add explicit guidance about when subagents are and aren’t warranted:

Chain complex prompts

With adaptive thinking and subagent orchestration, Claude handles most multistep reasoning internally. Explicit prompt chaining (breaking a task into sequential API calls) is still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure.

The most common chaining pattern is self-correction: generate a draft → have Claude review it against criteria → have Claude refine based on the review. Each step is a separate API call so you can log, evaluate, or branch at any point.

Reduce file creation in agentic coding

Claude’s latest models might sometimes create new files for testing and iteration purposes, particularly when working with code. This approach allows Claude to use files, especially Python scripts, as a ‘temporary scratchpad’ before saving its final output. Using temporary files can improve outcomes particularly for agentic coding use cases.

If you’d prefer to minimize the number of new files left behind, you can instruct Claude to clean up after itself:

Overeagerness

Claude Opus 4.5 and Claude Opus 4.6 have a tendency to overengineer by creating extra files, adding unnecessary abstractions, or building in flexibility that wasn’t requested. If you’re seeing this undesired behavior, add specific guidance to keep solutions minimal.

For example:

Avoid focusing on passing tests and hardcoding

Claude can sometimes focus too heavily on making tests pass at the expense of more general solutions, or might use workarounds such as helper scripts for complex refactoring instead of using standard tools directly. To prevent this behavior and get solutions that generalize:

Minimizing hallucinations in agentic coding

Claude’s latest models are less prone to hallucinations and give more accurate, grounded, intelligent answers based on the code. To encourage this behavior even more and minimize hallucinations:

Capability-specific tips

Improved vision capabilities

Claude Opus 4.5 and Claude Opus 4.6 have improved vision capabilities compared to previous Claude models. They perform better on image processing and data extraction tasks, particularly when there are multiple images present in context. These improvements carry over to computer use, where the models can more reliably interpret screenshots and UI elements. You can also use these models to analyze videos by breaking them up into frames.

One technique that has proven effective to further boost performance is to give Claude a crop tool or agent skill. Testing has shown consistent uplift on image evaluations when Claude is able to “zoom” in on relevant regions of an image. Anthropic has created a recipe for the crop tool.

Frontend design

Claude Opus 4.5 and Claude Opus 4.6 build complex, real-world web applications with strong frontend design. However, without guidance, models can default to generic patterns that create what users call the “AI slop” aesthetic. To create distinctive, creative front ends that surprise and delight:

For frontend design work outside the API, Claude Design provides a canvas and design tools where Claude generates and iterates on designs interactively.

Here’s a system prompt snippet you can use to encourage better frontend design:

You can also refer to the full skill definition.

Medication dosing

If people might ask your application about medicine doses, add the following block for the model your application calls to your system prompt, exactly as written. The block has Claude give a child’s dose of an over-the-counter medicine from the product’s label, not from memory. With web search, such as the web search tool, Claude checks the label before answering, which adds latency and search costs. Without web search, Claude points the person to the label’s dosing chart, a pharmacist, or the child’s doctor instead of giving a dose.

Migration considerations

When migrating to current Claude models from earlier generations:

  1. Be specific about the behavior you want: Consider describing exactly what you’d like to see in the output.

  2. Frame your instructions with modifiers: Adding modifiers that encourage Claude to increase the quality and detail of its output can help better shape Claude’s performance. For example, instead of “Create an analytics dashboard,” use “Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics to create a fully-featured implementation.”

  3. Request specific features explicitly: Ask explicitly for animations and interactive elements when you want them.

  4. Update thinking configuration: On Claude 4.6 and later models, use adaptive thinking (thinking: {type: "adaptive"}) and the effort parameter in place of manual thinking with budget_tokens. On Claude Opus 4.6 and Claude Sonnet 4.6, budget_tokens is deprecated but accepted. Claude 4.7 and later models return a 400 error for it.

  5. Migrate away from prefilled responses: Prefilled responses on the last assistant turn are no longer supported starting with Claude 4.6 models and Claude Mythos Preview. See Migrating away from prefilled responses for detailed guidance on alternatives.

  6. Tune anti-laziness prompting: If your prompts previously encouraged the model to be more thorough or use tools more aggressively, reduce that guidance. Claude 4.6 models are more proactive and might overtrigger on instructions that were needed for previous models.

  7. Pass thinking blocks back unchanged and keep history append-only: Append each assistant turn exactly as the API returned it, thinking blocks included. On Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5, editing earlier messages, rebuilding system or tools, or summarizing older turns in place between requests invalidates every later thinking block already in the history. Move those changes to mid-conversation system messages and server-side context management. See Keep the conversation history append-only.

For detailed migration steps, see the Migration guide.

Migrating to Claude Sonnet 5.5

See the Claude Sonnet 5.5 migration guide. It covers the breaking changes for code written for Claude Sonnet 5 and the steps from Claude Sonnet 4.6 and earlier, including the removal of manual extended thinking (budget_tokens).

Next steps

Behavioral differences and prompting patterns for Claude Fable 5.2, covering effort, finishing long tasks, approvals, code ownership, progress updates, subagents, caution that builds up, prompts and harnesses designed for earlier models, final reports, and safeguard refusals.

Behavioral differences and prompting patterns for Claude Fable 5.1, covering effort, task completion, progress updates, thinking blocks, tool-call batching, and writing style.

Behavioral differences and prompting patterns for Claude Fable 5 and Claude Mythos 5, covering effort, instruction following, long runs, memory, and scaffolding changes.

Behavioral differences and prompting patterns for Claude Sonnet 5.5, covering effort calibration, initiative and scope, running without up-front thinking, JSON output on reasoning tasks, progress updates, tool use, mid-turn user messages, coding verification, tool-call handling, visual inputs, and safeguard refusals.

Behavioral differences and prompting patterns for Claude Sonnet 5, covering effort, adaptive thinking defaults, and tool use.

Behavioral differences and prompting patterns for Claude Opus 5.5, covering effort calibration, thinking always on, progress updates, safeguard refusals, and visual inputs.

Behavioral differences and prompting patterns for Claude Opus 5, covering response verbosity, agentic narration, task scoping, subagent delegation, and self-correction.

Behavioral differences and prompting patterns for Claude Haiku 5.5, covering effort, search, JSON output with your own tools, early stopping, coding verification, mid-turn user messages, system prompt adherence in chatbots, and safeguard refusals.

When to use prompt engineering and how to plan your approach before tuning prompts.