Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

code-execution-tool changed

agents-and-tools/tool-use/code-execution-tool

Nearest release: v2.1.280, published under an hour before 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+44added
Lines−43removed
From line 10 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits13to this page, all time

The whole hunk

from line 10, old and new numbered
/
lines
from line 10
1010 - claude-mythos-5-1
1111 - claude-fable-5
1212 - claude-mythos-5
13 - claude-opus-5-5
1314 - claude-opus-5
1415 - claude-opus-4-8
1516 - claude-opus-4-7
from line 72
7172 -H "anthropic-version: 2023-06-01" \
7273 -H "content-type: application/json" \
7374 -d '{
74 "model": "claude-opus-5",
75 "model": "claude-opus-5-5",
7576 "max_tokens": 4096,
7677 "messages": [
7778 {
from line 91
9091 
9192 ```bash CLI
9293 ant messages create \
93 --model claude-opus-5 \
94 --model claude-opus-5-5 \
9495 --max-tokens 4096 \
9596 --message '{
9697 role: user,
from line 105
104105 client = anthropic.Anthropic()
105106 
106107 response = client.messages.create(
107 model="claude-opus-5",
108 model="claude-opus-5-5",
108109 max_tokens=4096,
109110 messages=[
110111 {
from line 123
122123 const client = new Anthropic();
123124 
124125 const response = await client.messages.create({
125 model: "claude-opus-5",
126 model: "claude-opus-5-5",
126127 max_tokens: 4096,
127128 messages: [
128129 {
from line 143
142143 
143144 var message = await client.Messages.Create(new()
144145 {
145 Model = Model.ClaudeOpus5,
146 Model = Model.ClaudeOpus5_5,
146147 MaxTokens = 4096,
147148 Messages = [new() { Role = Role.User, Content = "Use the code execution tool to calculate the mean and standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" }],
148149 Tools = [new CodeExecutionTool20250825()]
from line 156
155156 client := anthropic.NewClient()
156157 
157158 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
158 Model: anthropic.ModelClaudeOpus5,
159 Model: anthropic.ModelClaudeOpus5_5,
159160 MaxTokens: 4096,
160161 Messages: []anthropic.MessageParam{
161162 anthropic.NewUserMessage(anthropic.NewTextBlock("Use the code execution tool to calculate the mean and standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]")),
from line 175
174175 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
175176 
176177 MessageCreateParams params = MessageCreateParams.builder()
177 .model(Model.CLAUDE_OPUS_5)
178 .model(Model.CLAUDE_OPUS_5_5)
178179 .maxTokens(4096L)
179180 .addUserMessage("Use the code execution tool to calculate the mean and standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]")
180181 .addTool(CodeExecutionTool20250825.builder().build())
from line 196
195196 'content' => 'Use the code execution tool to calculate the mean and standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]',
196197 ],
197198 ],
198 model: Model::CLAUDE_OPUS_5,
199 model: Model::CLAUDE_OPUS_5_5,
199200 tools: [new CodeExecutionTool20250825()],
200201 );
201202 
from line 207
206207 client = Anthropic::Client.new
207208 
208209 message = client.messages.create(
209 model: Anthropic::Model::CLAUDE_OPUS_5,
210 model: Anthropic::Model::CLAUDE_OPUS_5_5,
210211 max_tokens: 4096,
211212 messages: [
212213 {
from line 299
298299 -H "anthropic-version: 2023-06-01" \
299300 -H "content-type: application/json" \
300301 -d '{
301 "model": "claude-opus-5",
302 "model": "claude-opus-5-5",
302303 "max_tokens": 4096,
303304 "messages": [{
304305 "role": "user",
from line 321
320321 
321322 # Then use the file_id with code execution
322323 ant messages create <<YAML
323 model: claude-opus-5
324 model: claude-opus-5-5
324325 max_tokens: 4096
325326 messages:
326327 - role: user
from line 344
343344 
344345 # Use the file_id with code execution
345346 response = client.messages.create(
346 model="claude-opus-5",
347 model="claude-opus-5-5",
347348 max_tokens=4096,
348349 messages=[
349350 {
from line 373
372373 
373374 // Use the file_id with code execution
374375 const response = await client.messages.create({
375 model: "claude-opus-5",
376 model: "claude-opus-5-5",
376377 max_tokens: 4096,
377378 messages: [
378379 {
from line 407
406407 // Use the file_id with code execution
407408 var parameters = new MessageCreateParams
408409 {
409 Model = Model.ClaudeOpus5,
410 Model = Model.ClaudeOpus5_5,
410411 MaxTokens = 4096,
411412 Messages = [
412413 new()
from line 446
445446 
446447 // Use the file_id with code execution
447448 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
448 Model: anthropic.ModelClaudeOpus5,
449 Model: anthropic.ModelClaudeOpus5_5,
449450 MaxTokens: 4096,
450451 Messages: []anthropic.MessageParam{
451452 anthropic.NewUserMessage(
from line 478
477478 // Use the file_id with code execution
478479 Message response = client.messages().create(
479480 MessageCreateParams.builder()
480 .model(Model.CLAUDE_OPUS_5)
481 .model(Model.CLAUDE_OPUS_5_5)
481482 .maxTokens(4096L)
482483 .addUserMessageOfBlockParams(List.of(
483484 ContentBlockParam.ofText(TextBlockParam.builder()
from line 505
504505 
505506 // Use the file_id with code execution
506507 $response = $client->messages->create(
507 model: Model::CLAUDE_OPUS_5,
508 model: Model::CLAUDE_OPUS_5_5,
508509 maxTokens: 4096,
509510 messages: [
510511 [
from line 532
531532 
532533 # Use the file_id with code execution
533534 response = client.messages.create(
534 model: Anthropic::Model::CLAUDE_OPUS_5,
535 model: Anthropic::Model::CLAUDE_OPUS_5_5,
535536 max_tokens: 4096,
536537 messages: [
537538 {
from line 574
573574 
574575 # Request code execution that creates files
575576 response = client.messages.create(
576 model="claude-opus-5",
577 model="claude-opus-5-5",
577578 max_tokens=4096,
578579 messages=[
579580 {
from line 613
612613 
613614 // Request code execution that creates files
614615 const response = await client.messages.create({
615 model: "claude-opus-5",
616 model: "claude-opus-5-5",
616617 max_tokens: 4096,
617618 messages: [
618619 {
from line 652
651652 
652653 var parameters = new MessageCreateParams
653654 {
654 Model = Model.ClaudeOpus5,
655 Model = Model.ClaudeOpus5_5,
655656 MaxTokens = 4096,
656657 Messages = [new() { Role = Role.User, Content = "Create a matplotlib visualization and save it as output.png" }],
657658 Tools = [new CodeExecutionTool20250825()]
from line 691
690691 ctx := context.Background()
691692 
692693 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
693 Model: anthropic.ModelClaudeOpus5,
694 Model: anthropic.ModelClaudeOpus5_5,
694695 MaxTokens: 4096,
695696 Messages: []anthropic.MessageParam{
696697 anthropic.NewUserMessage(anthropic.NewTextBlock("Create a matplotlib visualization and save it as output.png")),
from line 755
754755 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
755756 
756757 MessageCreateParams params = MessageCreateParams.builder()
757 .model(Model.CLAUDE_OPUS_5)
758 .model(Model.CLAUDE_OPUS_5_5)
758759 .maxTokens(4096L)
759760 .addUserMessage("Create a matplotlib visualization and save it as output.png")
760761 .addTool(CodeExecutionTool20250825.builder().build())
from line 807
806807 'content' => 'Create a matplotlib visualization and save it as output.png',
807808 ],
808809 ],
809 model: Model::CLAUDE_OPUS_5,
810 model: Model::CLAUDE_OPUS_5_5,
810811 tools: [new CodeExecutionTool20250825()],
811812 );
812813 
from line 848
847848 client = Anthropic::Client.new
848849 
849850 response = client.messages.create(
850 model: Anthropic::Model::CLAUDE_OPUS_5,
851 model: Anthropic::Model::CLAUDE_OPUS_5_5,
851852 max_tokens: 4096,
852853 messages: [
853854 {
from line 1147
11461147 -H "anthropic-version: 2023-06-01" \
11471148 -H "content-type: application/json" \
11481149 -d '{
1149 "model": "claude-opus-5",
1150 "model": "claude-opus-5-5",
11501151 "max_tokens": 4096,
11511152 "messages": [{
11521153 "role": "user",
from line 1166
11651166 -H "content-type: application/json" \
11661167 -d '{
11671168 "container": "'"$CONTAINER_ID"'",
1168 "model": "claude-opus-5",
1169 "model": "claude-opus-5-5",
11691170 "max_tokens": 4096,
11701171 "messages": [{
11711172 "role": "user",
from line 1182
11811182 ```bash CLI
11821183 # First request: Create a file with a random number
11831184 CONTAINER_ID=$(ant messages create \
1184 --model claude-opus-5 \
1185 --model claude-opus-5-5 \
11851186 --max-tokens 4096 \
11861187 --message '{role: user, content: Write a file with a random number and save it to "/tmp/number.txt"}' \
11871188 --tool '{type: code_execution_20250825, name: code_execution}' \
from line 1191
11901191 # Second request: Reuse the container to read the file
11911192 ant messages create \
11921193 --container "$CONTAINER_ID" \
1193 --model claude-opus-5 \
1194 --model claude-opus-5-5 \
11941195 --max-tokens 4096 \
11951196 --message '{role: user, content: Read the number from "/tmp/number.txt" and calculate its square}' \
11961197 --tool '{type: code_execution_20250825, name: code_execution}'
from line 1202
12011202 
12021203 # First request: create a file with a random number in a new container
12031204 response1 = client.messages.create(
1204 model="claude-opus-5",
1205 model="claude-opus-5-5",
12051206 max_tokens=4096,
12061207 messages=[
12071208 {
from line 1216
12151216 # Second request: pass the container ID back so Claude reuses the same container
12161217 response2 = client.messages.create(
12171218 container=response1.container.id,
1218 model="claude-opus-5",
1219 model="claude-opus-5-5",
12191220 max_tokens=4096,
12201221 messages=[
12211222 {
from line 1235
12341235 
12351236 // First request: Claude creates a file inside a fresh code execution container
12361237 const response1 = await client.messages.create({
1237 model: "claude-opus-5",
1238 model: "claude-opus-5-5",
12381239 max_tokens: 4096,
12391240 messages: [
12401241 {
from line 1254
12531254 // Second request: pass the container ID back so it reuses the same container
12541255 const response2 = await client.messages.create({
12551256 container: response1.container.id,
1256 model: "claude-opus-5",
1257 model: "claude-opus-5-5",
12571258 max_tokens: 4096,
12581259 messages: [
12591260 { role: "user", content: "Read the number from /tmp/number.txt and calculate its square" }
from line 1271
12701271 // First request: Claude creates a file inside a fresh code execution container
12711272 var response1 = await client.Messages.Create(new()
12721273 {
1273 Model = Model.ClaudeOpus5,
1274 Model = Model.ClaudeOpus5_5,
12741275 MaxTokens = 4096,
12751276 Messages = [new() { Role = Role.User, Content = "Write a file with a random number and save it to '/tmp/number.txt'" }],
12761277 Tools = [new CodeExecutionTool20250825()]
from line 1281
12801281 var response2 = await client.Messages.Create(new()
12811282 {
12821283 Container = response1.Container!.ID,
1283 Model = Model.ClaudeOpus5,
1284 Model = Model.ClaudeOpus5_5,
12841285 MaxTokens = 4096,
12851286 Messages = [new() { Role = Role.User, Content = "Read the number from '/tmp/number.txt' and calculate its square" }],
12861287 Tools = [new CodeExecutionTool20250825()]
from line 1300
12991300 
13001301 // First request: create a file with a random number in a new container
13011302 response1, err := client.Messages.New(ctx, anthropic.MessageNewParams{
1302 Model: anthropic.ModelClaudeOpus5,
1303 Model: anthropic.ModelClaudeOpus5_5,
13031304 MaxTokens: 4096,
13041305 Messages: []anthropic.MessageParam{
13051306 anthropic.NewUserMessage(anthropic.NewTextBlock("Write a file with a random number and save it to '/tmp/number.txt'")),
from line 1316
13151316 Container: anthropic.MessageCreateParamsContainerUnion{
13161317 OfString: anthropic.String(response1.Container.ID),
13171318 },
1318 Model: anthropic.ModelClaudeOpus5,
1319 Model: anthropic.ModelClaudeOpus5_5,
13191320 MaxTokens: 4096,
13201321 Messages: []anthropic.MessageParam{
13211322 anthropic.NewUserMessage(anthropic.NewTextBlock("Read the number from '/tmp/number.txt' and calculate its square")),
from line 1335
13341335 
13351336 // First request: create a file with a random number in a new container
13361337 MessageCreateParams params1 = MessageCreateParams.builder()
1337 .model(Model.CLAUDE_OPUS_5)
1338 .model(Model.CLAUDE_OPUS_5_5)
13381339 .maxTokens(4096L)
13391340 .addUserMessage("Write a file with a random number and save it to '/tmp/number.txt'")
13401341 .addTool(CodeExecutionTool20250825.builder().build())
from line 1346
13451346 // Second request: pass the container ID back so it reuses the same container
13461347 MessageCreateParams params2 = MessageCreateParams.builder()
13471348 .container(response1.container().orElseThrow().id())
1348 .model(Model.CLAUDE_OPUS_5)
1349 .model(Model.CLAUDE_OPUS_5_5)
13491350 .maxTokens(4096L)
13501351 .addUserMessage("Read the number from '/tmp/number.txt' and calculate its square")
13511352 .addTool(CodeExecutionTool20250825.builder().build())
from line 1368
13671368 'content' => "Write a file with a random number and save it to '/tmp/number.txt'",
13681369 ],
13691370 ],
1370 model: Model::CLAUDE_OPUS_5,
1371 model: Model::CLAUDE_OPUS_5_5,
13711372 tools: [new CodeExecutionTool20250825()],
13721373 );
13731374 
from line 1382
13811382 'content' => "Read the number from '/tmp/number.txt' and calculate its square",
13821383 ],
13831384 ],
1384 model: Model::CLAUDE_OPUS_5,
1385 model: Model::CLAUDE_OPUS_5_5,
13851386 tools: [new CodeExecutionTool20250825()],
13861387 );
13871388 
from line 1394
13931394 
13941395 # First request: Claude creates the file inside a fresh code execution container
13951396 response1 = client.messages.create(
1396 model: Anthropic::Model::CLAUDE_OPUS_5,
1397 model: Anthropic::Model::CLAUDE_OPUS_5_5,
13971398 max_tokens: 4096,
13981399 messages: [
13991400 {
from line 1408
14071408 # Second request: pass the container ID back so Claude reuses the same container
14081409 response2 = client.messages.create(
14091410 container: response1.container.id,
1410 model: Anthropic::Model::CLAUDE_OPUS_5,
1411 model: Anthropic::Model::CLAUDE_OPUS_5_5,
14111412 max_tokens: 4096,
14121413 messages: [
14131414 {