thinking-tool-workflows changedbuild-with-claude/thinking-tool-workflows
Nearest release: v2.1.299, 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+27added
Lines−31removed
From line
37
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 37, old and new numbered
/
from line 37
3737 -H "x-api-key: $ANTHROPIC_API_KEY" \
3838 -d @- <<'EOF'
3939 {
40 "model": "claude-opus-4-8",
40 "model": "claude-opus-5-5",
4141 "max_tokens": 16000,
4242 "thinking": {"type": "adaptive"},
4343 "tools": [{
from line 58
5858
5959 ```bash CLI
6060 ant messages create --transform content <<'YAML'
61 model: claude-opus-4-8
61 model: claude-opus-5-5
6262 max_tokens: 16000
6363 thinking:
6464 type: adaptive
from line 95
9595
9696 # First request - Claude responds with thinking and tool request
9797 response = client.messages.create(
98 model="claude-opus-4-8",
98 model="claude-opus-5-5",
9999 max_tokens=16000,
100100 thinking={"type": "adaptive"},
101101 tools=[weather_tool],
from line 121
121121
122122 // First request - Claude responds with thinking and tool request
123123 const response = await client.messages.create({
124 model: "claude-opus-4-8",
124 model: "claude-opus-5-5",
125125 max_tokens: 16000,
126126 thinking: {
127127 type: "adaptive"
from line 151
151151
152152 var parameters = new MessageCreateParams
153153 {
154 Model = Model.ClaudeOpus4_8,
154 Model = Model.ClaudeOpus5_5,
155155 MaxTokens = 16000,
156156 Thinking = new ThinkingConfigAdaptive(),
157157 Tools = [weatherTool],
from line 182
182182 }
183183
184184 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
185 Model: anthropic.ModelClaudeOpus4_8,
185 Model: anthropic.ModelClaudeOpus5_5,
186186 MaxTokens: 16000,
187187 Thinking: anthropic.ThinkingConfigParamUnion{
188188 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 204
204204 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
205205
206206 MessageCreateParams params = MessageCreateParams.builder()
207 .model(Model.CLAUDE_OPUS_4_8)
207 .model(Model.CLAUDE_OPUS_5_5)
208208 .maxTokens(16000L)
209209 .thinking(ThinkingConfigAdaptive.builder().build())
210210 .addTool(Tool.builder()
from line 244
244244 messages: [
245245 ['role' => 'user', 'content' => "What's the weather in Paris?"]
246246 ],
247 model: 'claude-opus-4-8',
247 model: 'claude-opus-5-5',
248248 thinking: ['type' => 'adaptive'],
249249 tools: [$weatherTool],
250250 );
from line 267
267267 }
268268
269269 message = client.messages.create(
270 model: "claude-opus-4-8",
270 model: "claude-opus-5-5",
271271 max_tokens: 16000,
272272 thinking: {
273273 type: "adaptive"
from line 283
283283 </Step>
284284
285285 <Step title="Capture the content array to echo back">
286 You should see `thinking`, `text`, and `tool_use` blocks in the response content on a run where Claude chose to think (on simpler requests, adaptive mode may skip the thinking block). Keep this content array intact: the next step sends it back verbatim.
286 You should see `thinking` and `tool_use` blocks in the response content on a run where Claude chose to think (on simpler requests, adaptive mode may skip the thinking block). A note Claude writes before the tool call comes back as a `text` block or, on models that write [progress updates](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates), as another `thinking` block. Keep this content array intact: the next step sends it back verbatim.
287287
288288 <Note>
289 To see thinking text like this output, add `display: "summarized"` to the request. On models where display defaults to omitted, including claude-opus-4-8, the `thinking` field otherwise comes back as an empty string with only the `signature` populated. Either way, echo the content array back unchanged; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
289 To see thinking text like this output, add `display: "summarized"` to the request. On models where display defaults to omitted, including Claude Opus 5.5, the `thinking` field otherwise comes back as an empty string with only the `signature` populated. Either way, echo the content array back unchanged; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
290290 </Note>
291291
292292 ```json Output
from line 298
298298 "signature": "BDaL4VrbR2Oj0hO4XpJxT28J5T...."
299299 },
300300 {
301 "type": "text",
302 "text": "I can help you get the current weather information for Paris. Let me check that for you"
303 },
304 {
305301 "type": "tool_use",
306302 "id": "toolu_01CswdEQBMshySk6Y9DFKrfq",
307303 "name": "get_weather",
from line 327
331327 # through a file keeps it out of shell-expansion position later.
332328 ant messages create --transform content --format jsonl \
333329 > assistant_content.json <<'YAML'
334 model: claude-opus-4-8
330 model: claude-opus-5-5
335331 max_tokens: 16000
336332 thinking:
337333 type: adaptive
from line 356
360356 ($blocks[0][] | select(.type == "tool_use") | .id)
361357 ' <<'JSON' | ant messages create
362358 {
363 "model": "claude-opus-4-8",
359 "model": "claude-opus-5-5",
364360 "max_tokens": 16000,
365361 "thinking": {"type": "adaptive"},
366362 "tools": [{
from line 396
400396 },
401397 }
402398 response = client.messages.create(
403 model="claude-opus-4-8",
399 model="claude-opus-5-5",
404400 max_tokens=16000,
405401 thinking={"type": "adaptive"},
406402 tools=[weather_tool],
from line 411
415411
416412 # Second request - Include the assistant turn and the tool result
417413 continuation = client.messages.create(
418 model="claude-opus-4-8",
414 model="claude-opus-5-5",
419415 max_tokens=16000,
420416 thinking={"type": "adaptive"},
421417 tools=[weather_tool],
from line 451
455451 };
456452
457453 const response = await client.messages.create({
458 model: "claude-opus-4-8",
454 model: "claude-opus-5-5",
459455 max_tokens: 16000,
460456 thinking: {
461457 type: "adaptive"
from line 472
476472 if (toolUseBlock) {
477473 // Second request - Include the assistant turn and the tool result
478474 const continuation = await client.messages.create({
479 model: "claude-opus-4-8",
475 model: "claude-opus-5-5",
480476 max_tokens: 16000,
481477 thinking: {
482478 type: "adaptive"
from line 518
522518
523519 var parameters = new MessageCreateParams
524520 {
525 Model = Model.ClaudeOpus4_8,
521 Model = Model.ClaudeOpus5_5,
526522 MaxTokens = 16000,
527523 Thinking = new ThinkingConfigAdaptive(),
528524 Tools = [weatherTool],
from line 545
549545 // Build continuation with tool result
550546 var continuationParams = new MessageCreateParams
551547 {
552 Model = Model.ClaudeOpus4_8,
548 Model = Model.ClaudeOpus5_5,
553549 MaxTokens = 16000,
554550 Thinking = new ThinkingConfigAdaptive(),
555551 Tools = [weatherTool],
from line 588
592588 }
593589
594590 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
595 Model: anthropic.ModelClaudeOpus4_8,
591 Model: anthropic.ModelClaudeOpus5_5,
596592 MaxTokens: 16000,
597593 Thinking: anthropic.ThinkingConfigParamUnion{
598594 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 613
617613 weatherData := map[string]int{"temperature": 88}
618614
619615 continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
620 Model: anthropic.ModelClaudeOpus4_8,
616 Model: anthropic.ModelClaudeOpus5_5,
621617 MaxTokens: 16000,
622618 Thinking: anthropic.ThinkingConfigParamUnion{
623619 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 653
657653 .build();
658654
659655 MessageCreateParams initialParams = MessageCreateParams.builder()
660 .model(Model.CLAUDE_OPUS_4_8)
656 .model(Model.CLAUDE_OPUS_5_5)
661657 .maxTokens(16000L)
662658 .thinking(ThinkingConfigAdaptive.builder().build())
663659 .addTool(weatherTool)
from line 674
678674
679675 // Second request: echo the assistant turn as received, then the tool result
680676 MessageCreateParams continuationParams = MessageCreateParams.builder()
681 .model(Model.CLAUDE_OPUS_4_8)
677 .model(Model.CLAUDE_OPUS_5_5)
682678 .maxTokens(16000L)
683679 .thinking(ThinkingConfigAdaptive.builder().build())
684680 .addTool(weatherTool)
from line 718
722718 messages: [
723719 ['role' => 'user', 'content' => "What's the weather in Paris?"]
724720 ],
725 model: 'claude-opus-4-8',
721 model: 'claude-opus-5-5',
726722 thinking: ['type' => 'adaptive'],
727723 tools: [$weatherTool],
728724 );
from line 746
750746 ]
751747 ]]
752748 ],
753 model: 'claude-opus-4-8',
749 model: 'claude-opus-5-5',
754750 thinking: ['type' => 'adaptive'],
755751 tools: [$weatherTool],
756752 );
from line 770
774770 }
775771
776772 response = client.messages.create(
777 model: "claude-opus-4-8",
773 model: "claude-opus-5-5",
778774 max_tokens: 16000,
779775 thinking: {
780776 type: "adaptive"
from line 788
792788 weather_data = { temperature: 88 }
793789
794790 continuation = client.messages.create(
795 model: "claude-opus-4-8",
791 model: "claude-opus-5-5",
796792 max_tokens: 16000,
797793 thinking: {
798794 type: "adaptive"
No line in this hunk matches that.