The whole hunk
from line 37, old and new numbered
/
lines
from line 37
3737 For Linux environments, download the release binary directly.
3838
3939 ```bash
40 VERSION=1.29.0
40 VERSION=1.30.0
4141 OS=$(uname -s | tr '[:upper:]' '[:lower:]')
4242 case $(uname -m) in
4343 x86_64) ARCH=amd64 ;;
from line 336
336336
337337 The `agent_toolset_20260401` tool type enables the full set of pre-built agent tools (bash, file operations, web search, and more). See [Tools](https://platform.claude.com/docs/en/managed-agents/tools) for the complete list and per-tool configuration options.
338338
339 Save the returned `agent.id` (the CLI's [`ant apply`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/scripting#version-controlling-api-resources) prints it and records it in `claude-lock.json`). You'll reference it in every session you create.
339 Save the returned `agent.id` (the CLI's [`ant apply`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply) prints it and records it in `claude-lock.json`). You'll reference it in every session you create.
340340 </Step>
341341
342342 <Step title="Create an environment">
from line 623
623623 match event.type:
624624 case "agent.message":
625625 for block in event.content:
626 print(block.text, end="")
626 if block.type == "text":
627 print(block.text, end="")
627628 case "agent.tool_use":
628629 print(f"\n[Using tool: {event.name}]")
629630 case "session.status_idle":
from line 654
653654 for await (const event of stream) {
654655 if (event.type === "agent.message") {
655656 for (const block of event.content) {
656 process.stdout.write(block.text);
657 if (block.type === "text") {
658 process.stdout.write(block.text);
659 }
657660 }
658661 } else if (event.type === "agent.tool_use") {
659662 console.log(`\n[Using tool: ${event.name}]`);
from line 697
694697 {
695698 foreach (var block in message.Content)
696699 {
697 Console.Write(block.Text);
700 if (block.Value is BetaManagedAgentsTextBlock textBlock)
701 {
702 Console.Write(textBlock.Text);
703 }
698704 }
699705 }
700706 else if (ev.Value is BetaManagedAgentsAgentToolUseEvent toolUse)
from line 743
737743 switch event := stream.Current().AsAny().(type) {
738744 case anthropic.BetaManagedAgentsAgentMessageEvent:
739745 for _, block := range event.Content {
740 fmt.Print(block.Text)
746 if block.Type == "text" {
747 fmt.Print(block.Text)
748 }
741749 }
742750 case anthropic.BetaManagedAgentsAgentToolUseEvent:
743751 fmt.Printf("\n[Using tool: %s]\n", event.Name)
from line 802
794802 // Process streaming events
795803 foreach ($stream as $event) {
796804 match ($event->type) {
797 'agent.message' => print(implode('', array_map(fn($block) => $block->text, $event->content))),
805 'agent.message' => array_walk(
806 $event->content,
807 static fn ($block) => $block->type === 'text' ? print($block->text) : null,
808 ),
798809 'agent.tool_use' => print("\n[Using tool: {$event->name}]\n"),
799810 'session.status_idle' => print("\n\nAgent finished.\n"),
800811 default => null,
from line 832
821832 stream.each do |event|
822833 case event.type
823834 in :"agent.message"
824 event.content.each { print it.text }
835 event.content.each { print it.text if it.type == :text }
825836 in :"agent.tool_use"
826837 puts "\n[Using tool: #{event.name}]"
827838 in :"session.status_idle"