claude-prompting-best-practices changedbuild-with-claude/prompt-engineering/claude-prompting-best-practices
Nearest release: v2.1.307, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+51added
Lines−51removed
From line
35
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits22to this page, all time
### Leverage thinking and interleaved thinking capabilities ### Leverage thinking & interleaved thinking capabilities
The whole hunk
from line 35, old and new numbered
/
from line 35
3535
3636### Be clear and direct
3737
38Claude responds well to clear, explicit instructions. Being specific about your desired output can help enhance results. If you want "above and beyond" behavior, explicitly request it rather than relying on the model to infer this from vague prompts.
38Claude 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.
3939
4040Think 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.
4141
42**Golden rule:** 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.
42**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.
4343
44* Be specific about the desired output format and constraints.
44* Be specific about the output format and constraints you want.
4545* Provide instructions as sequential steps using numbered lists or bullet points when the order or completeness of steps matters.
4646
4747<Accordion title="Example: Creating an analytics dashboard" defaultOpen>
from line 60
6060
6161### Add context to improve performance
6262
63Providing context or motivation behind your instructions, such as explaining to Claude why such behavior is important, can help Claude better understand your goals and deliver more targeted responses.
63Providing 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.
6464
6565<Accordion title="Example: Formatting preferences" defaultOpen>
6666 **Less effective:**
from line 76
7676 ```
7777</Accordion>
7878
79Claude is smart enough to generalize from the explanation.
79Claude can generalize from the explanation.
8080
8181### Use examples effectively
8282
from line 240
240240
241241When working with large documents or data-rich inputs (20k+ tokens), structure your prompt carefully to get the best results:
242242
243* **Put longform 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.
243* **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.
244244
245245 <Note>
246246 Queries at the end can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs.
from line 323
323323
324324* **More direct and grounded:** Provides fact-based progress reports rather than self-celebratory updates
325325* **More conversational:** Slightly more fluent and colloquial, less machine-like
326* **Less verbose:** May skip detailed summaries for efficiency unless prompted otherwise
326* **Less verbose:** Might skip detailed summaries for efficiency unless prompted otherwise
327327
328This means Claude may skip verbal summaries after tool calls, jumping directly to the next action. If you prefer more visibility into its work:
328This means Claude might skip verbal summaries after tool calls, jumping directly to the next action. If you prefer more visibility into its work:
329329
330330```text Sample prompt wrap
331331After completing a task that involves tool use, provide a quick summary of the work you've done.
from line 346
346346
347347 * Try: "Write the prose sections of your response in \<smoothly\_flowing\_prose\_paragraphs> tags."
348348
3493. **Match your prompt style to the desired output**
3493. **Match your prompt style to the output you want**
350350
351 The formatting style used in your prompt may influence Claude's response style. If you are still experiencing steerability issues with output formatting, try matching your prompt style to your desired output style as closely as possible. For example, removing markdown from your prompt can reduce the volume of markdown in the output.
351 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.
352352
3533534. **Use detailed prompts for specific formatting preferences**
354354
from line 406
406406Here are common prefill scenarios and how to migrate away from them:
407407
408408<Accordion title="Controlling output formatting">
409 Prefills have been used to force specific output formats like JSON/YAML, classification, and similar patterns where the prefill constrains Claude to a particular structure.
409 Prefills have been used to force specific output formats such as JSON/YAML, classification, and similar patterns where the prefill constrains Claude to a particular structure.
410410
411 **Migration:** The [Structured Outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) feature is designed specifically to constrain Claude's responses to follow a given schema. Try asking the model to conform to your output structure first, as newer models can reliably match complex schemas when told to, especially if implemented with retries. For classification tasks, use either tools with an enum field containing your valid labels or structured outputs.
411 **Migration:** The [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) feature is designed specifically to constrain Claude's responses to follow a given schema. Try asking the model to conform to your output structure first, as newer models can reliably match complex schemas when told to, especially if implemented with retries. For classification tasks, use either tools with an enum field containing your valid labels or structured outputs.
412412</Accordion>
413413
414414<Accordion title="Eliminating preambles">
415 Prefills like `Here is the requested summary:\n` were used to skip introductory text.
415 Prefills such as `Here is the requested summary:\n` were used to skip introductory text.
416416
417417 **Migration:** Use direct instructions in the system prompt: "Respond directly without preamble. Do not start with phrases like 'Here is...', 'Based on...', etc." Alternatively, direct the model to output within XML tags, use structured outputs, or use tool calling. If the occasional preamble slips through, strip it in post-processing.
418418</Accordion>
from line 424
424424</Accordion>
425425
426426<Accordion title="Continuations">
427 Prefills were used to continue partial completions, resume interrupted responses, or pick up where a previous generation left off.
427 Prefills were used to continue partial completions, resume interrupted responses, or extend a previous generation from where it ended.
428428
429429 **Migration:** Move the continuation to the user message, and include the final text from the interrupted response: "Your previous response was interrupted and ended with \`\[previous\_response]\`. Continue from where you left off." If this is part of error-handling or incomplete-response-handling and there is no UX penalty, retry the request.
430430</Accordion>
from line 474
474474</default_to_action>
475475```
476476
477On the other hand, if you want the model to be more hesitant by default, less prone to jumping straight into implementations, and only take action if requested, you can steer this behavior with a prompt like the following:
477On 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:
478478
479479```text Sample prompt for conservative action wrap
480480<do_not_act_before_instructions>
from line 485
485485</do_not_act_before_instructions>
486486```
487487
488Claude 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 may now overtrigger. The fix is to dial back any aggressive language. Where you might have said "CRITICAL: You MUST use this tool when...", you can use more normal prompting like "Use this tool when...".
488Claude 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...".
489489
490490### Optimize parallel tool calling
491491
492Claude's latest models run independent tool calls in parallel. These models will:
492Claude's latest models run independent tool calls in parallel. These models:
493493
494494* Run multiple speculative searches during research
495495* Read several files at once to build context faster
496496* Run bash commands in parallel (which can even bottleneck system performance)
497497
498This behavior is steerable. While the model has a high success rate in parallel tool calling without prompting, you can boost this to \~100% or adjust the aggression level:
498This 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:
499499
500500```text Sample prompt for maximum parallel efficiency wrap
501501<use_parallel_tool_calls>
from line 521
521521
522522### Overthinking and excessive thoroughness
523523
524Claude Opus 4.6 does more upfront exploration than previous models, especially at higher [`effort`](https://platform.claude.com/docs/en/build-with-claude/effort) settings. This initial work often helps to optimize the final results, but the model may 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:
524Claude Opus 4.6 does more upfront exploration than previous models, especially at higher [`effort`](https://platform.claude.com/docs/en/build-with-claude/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:
525525
526* **Replace blanket defaults with more targeted instructions.** Instead of "Default to using \[tool]," add guidance like "Use \[tool] when it would enhance your understanding of the problem."
527* **Remove over-prompting.** Tools that undertriggered in previous models are likely to trigger appropriately now. Instructions like "If in doubt, use \[tool]" will cause overtriggering.
526* **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."
527* **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.
528528* **Use effort as a fallback.** If Claude continues to be overly aggressive, use a lower setting for `effort`.
529529
530In some cases, Claude Opus 4.6 may 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.
530In 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.
531531
532532```text Sample prompt wrap
533533When you're deciding how to approach a problem, choose an approach and commit to it.
from line 538
538538
539539If you need a hard ceiling on thinking costs, extended thinking with a `budget_tokens` cap is still functional on Opus 4.6 and Sonnet 4.6 but is deprecated. On Claude 4.7 and later models, setting `budget_tokens` returns a 400 error. Prefer lowering the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) setting or using `max_tokens` as a hard limit with [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking).
540540
541### Leverage thinking & interleaved thinking capabilities
541### Leverage thinking and interleaved thinking capabilities
542542
543543Claude'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.
544544
from line 554
554554information, and then take the best next action.
555555```
556556
557The triggering behavior for adaptive thinking is promptable. If you find the model thinking more often than you'd like, which can happen with large or complex system prompts, add guidance to steer it:
557The 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:
558558
559559```text Sample prompt wrap
560560Thinking adds latency and should only be used when it will meaningfully improve
from line 773
773773
774774If 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.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.
775775
776* **Prefer general instructions over prescriptive steps.** A prompt like "think thoroughly" often produces better reasoning than a hand-written step-by-step plan. Claude's reasoning frequently exceeds what a human would prescribe.
776* **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.
777777* **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.
778778* **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, and to put the final answer in `<answer>` tags so you can extract it. On Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, and Claude Sonnet 5.5, rely on thinking instead, at a lower [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level if cost or latency matters: a prompt that asks the model to write out its reasoning, for example in `<thinking>` tags, may be declined. See [Keep reasoning in thinking blocks](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#keep-reasoning-in-thinking-blocks).
779779* **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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#task-scope-and-over-verification).
780780
781781<Note>
782 When extended thinking is disabled, Claude Opus 4.5 is particularly sensitive to the word "think" and its variants. Consider using alternatives like "consider," "evaluate," or "reason through" in those cases.
782 When extended thinking is disabled, Claude Opus 4.5 is particularly sensitive to the word "think" and its variants. Consider using alternatives such as "consider," "evaluate," or "reason through" in those cases.
783783</Note>
784784
785785<Info>
from line 794
794794
795795#### Context awareness and multiwindow workflows
796796
797Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5 (deprecated), and Claude Haiku 4.5 feature [context awareness](https://platform.claude.com/docs/en/build-with-claude/context-windows#context-awareness), enabling the model to track its remaining context window (that is, its "token budget") throughout a conversation. This enables Claude to execute tasks and manage context more effectively by understanding how much space it has to work.
797Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5 (deprecated), and Claude Haiku 4.5 feature [context awareness](https://platform.claude.com/docs/en/build-with-claude/context-windows#context-awareness), which lets the model track its remaining context window (that is, its "token budget") throughout a conversation. This allows Claude to run tasks and manage context more effectively based on how much space it has to work.
798798
799799**Managing context limits:**
800800
801If you are using Claude in an agent harness that compacts context or allows saving context to external files (like in Claude Code), consider adding this information to your prompt so Claude can behave accordingly. Otherwise, Claude may sometimes naturally try to wrap up work as it approaches the context limit. The following is an example prompt:
801If 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:
802802
803803```text Sample prompt wrap
804804Your context window will be automatically compacted as it approaches its limit, allowing
from line 820
820820
8218212. **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."
822822
8233. **Set up quality of life tools:** Encourage Claude to create setup scripts (for example, `init.sh`) to gracefully start servers, run test suites, and linters. This prevents repeated work when continuing from a fresh context window.
8233. **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.
824824
8254. **Starting fresh versus 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 may want to take advantage of this over compaction. Be prescriptive about how it should start:
8254. **Starting fresh versus 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:
826826
827827 * "Call pwd; you can only read and write files in this directory."
828828 * "Review progress.txt, tests.json, and the git logs."
from line 841
841841
842842#### State management best practices
843843
844* **Use structured formats for state data:** When tracking structured information (like test results or task status), use JSON or other structured formats to help Claude understand schema requirements.
844* **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.
845845* **Use unstructured text for progress notes:** Freeform progress notes work well for tracking general progress and context.
846846* **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.
847847* **Emphasize incremental progress:** Explicitly ask Claude to keep track of its progress and focus on incremental work.
from line 873
873873
874874### Balancing autonomy and safety
875875
876Without guidance, Claude Opus 4.6 may 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:
876Without 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:
877877
878878```text Sample prompt wrap
879879Consider the reversibility and potential impact of your actions. You are encouraged to
from line 919
919919To take advantage of this behavior:
920920
9219211. **Ensure well-defined subagent tools:** Have subagent tools available and described in tool definitions.
9222. **Let Claude orchestrate naturally:** Claude will delegate appropriately without explicit instruction.
9233. **Watch for overuse:** Claude Opus 4.6 has a strong predilection for subagents and may spawn them in situations where a simpler, direct approach would suffice. For example, the model may 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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#controlling-subagent-spawning) for guidance and a sample damping prompt.
9222. **Let Claude orchestrate naturally:** Claude delegates appropriately without explicit instruction.
9233. **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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#controlling-subagent-spawning) for guidance and a sample damping prompt.
924924
925925If you're seeing excessive subagent use, add explicit guidance about when subagents are and aren't warranted:
926926
from line 939
939939
940940### Reduce file creation in agentic coding
941941
942Claude's latest models may 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.
942Claude'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.
943943
944If you'd prefer to minimize net new file creation, you can instruct Claude to clean up after itself:
944If you'd prefer to minimize the number of new files left behind, you can instruct Claude to clean up after itself:
945945
946946```text Sample prompt wrap
947947If you create any temporary new files, scripts, or helper files for iteration, clean up
from line 976
976976
977977### Avoid focusing on passing tests and hardcoding
978978
979Claude can sometimes focus too heavily on making tests pass at the expense of more general solutions, or may use workarounds like helper scripts for complex refactoring instead of using standard tools directly. To prevent this behavior and get solutions that generalize:
979Claude 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:
980980
981981```text Sample prompt wrap
982982Please write a high-quality, general-purpose solution using the standard tools
from line 1018
10181018
10191019### Frontend design
10201020
1021Claude 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 frontends that surprise and delight:
1021Claude 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:
10221022
10231023<Tip>
10241024 For a detailed guide on improving frontend design, see the blog post on [improving frontend design through skills](https://www.claude.com/blog/improving-frontend-design-through-skills).
from line 1113
11131113
11141114When migrating to current Claude models from earlier generations:
11151115
11161. **Be specific about desired behavior:** Consider describing exactly what you'd like to see in the output.
11161. **Be specific about the behavior you want:** Consider describing exactly what you'd like to see in the output.
11171117
11182. **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."
11182. **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."
11191119
11203. **Request specific features explicitly:** Animations and interactive elements should be requested explicitly when desired.
11203. **Request specific features explicitly:** Ask explicitly for animations and interactive elements when you want them.
11211121
112211224. **Update thinking configuration:** Claude 4.6 and later models use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) (`thinking: {type: "adaptive"}`) instead of manual thinking with `budget_tokens`. On Claude 4.7 and later models, setting `budget_tokens` returns a 400 error. Use the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) to control thinking depth.
11231123
112411245. **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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#migrating-away-from-prefilled-responses) for detailed guidance on alternatives.
11251125
11266. **Tune anti-laziness prompting:** If your prompts previously encouraged the model to be more thorough or use tools more aggressively, dial back that guidance. Claude 4.6 models are more proactive and may overtrigger on instructions that were needed for previous models.
11266. **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.
11271127
112811287. **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.1, Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5, [modifying the conversation before a thinking block](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-in-conversation) results in an error, or in the block being dropped if you opt into that: editing earlier messages, rebuilding `system` or `tools`, or summarizing older turns in place between requests invalidates every later thinking block, so move those changes to mid-conversation system messages and server-side context management. See [Keep the conversation history append-only](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-the-conversation-history-append-only).
11291129
No line in this hunk matches that.