Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

message-threads changedbuild-with-claude/message-threads

Recorded here
Lines+8added
Lines−5removed
From line 228 where the diff opens
First seen 2 Nov 2026 this site's first read of the page
Recorded edits4to this page, all time

The whole hunk

from line 228, old and new numbered
/
lines
from line 228
228228 $second = $thread->send(['role' => 'user', 'content' => 'How long does standard shipping usually take?']);
229229 
230230 foreach ($second->content as $block) {
231 if ($block instanceof BetaTextBlock) {
231 if ($block instanceof \Anthropic\Beta\Messages\BetaTextBlock) {
232232 echo $block->text, PHP_EOL;
233233 }
234234 }
from line 549
549549 );
550550 
551551 foreach ($second->content as $block) {
552 if ($block instanceof BetaTextBlock) {
552 if ($block instanceof \Anthropic\Beta\Messages\BetaTextBlock) {
553553 echo $block->text, PHP_EOL;
554554 }
555555 }
from line 602
602602 
603603To change a create-only or fixed field, start a new thread: send the full conversation in a create request with the new values.
604604 
605On 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, changing `system` or `tools` makes the `thinking` and `redacted_thinking` blocks already in the conversation invalid, and the create request can return a 400 error. To avoid it, leave every `thinking` and `redacted_thinking` block out of the conversation you send. The model then answers without that earlier reasoning. See [What counts as an edit](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#what-counts-as-an-edit), [When `prefix_mismatch_behavior` is unset](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#enforcement), and [What the API does with an invalid block](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#mismatch-behavior).
605**If you change `system` or `tools`:** On the following models, leave every `thinking` and `redacted_thinking` block out of the conversation that you send in the new create request: 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. The model then answers without that earlier reasoning.
606606 
607* **Why:** Changing `system` or `tools` makes the `thinking` and `redacted_thinking` blocks already in the conversation invalid. See [What counts as an edit](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#what-counts-as-an-edit).
608* **If you send the blocks anyway:** The create request can return a 400 error. Whether it does depends on the model and your account. See [When `prefix_mismatch_behavior` is unset](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#enforcement) and [What the API does with an invalid block](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#mismatch-behavior).
609 
607610Send only the new messages on a continue request. The API doesn’t check them against the messages it already has. A message you send again can appear twice in the conversation, or the request can return an error. For example, a continue request that starts with the previous response returns an error.
608611 
609612The new messages usually start with a `user` message: your next user turn, or the `tool_result` blocks that answer a `tool_use` in the previous response. If a response stops with [`stop_reason: "pause_turn"`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#pause-turn), resume it with a continue request from that response’s `id` and an empty `messages` list (`"messages": []`). If that request returns a 404 error, replay the full conversation, including the paused response, in a new create request. Don’t send a new `user` message while the turn is paused: the API rejects it. With the SDK thread helper, call `send()` (go, csharp: `Send()`; ruby: `send_message()`) with no messages: the helper sends this request and replays on a 404 error.
from line 818
815818## See also
816819 
817820* [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
818* [Streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
819* [Errors](https://platform.claude.com/docs/en/api/errors)
821* [Streaming messages](https://platform.claude.com/docs/en/build-with-claude/streaming)
822* [Claude API errors](https://platform.claude.com/docs/en/api/errors)
820823 
821824## Availability
822825 
Feedback