Key Updates in Claude Code v2.1.336 - WebFetch Idle Timeout and Verification of the Anthropic Terraform Provider  #AWSreInvent

Key Updates in Claude Code v2.1.336 - WebFetch Idle Timeout and Verification of the Anthropic Terraform Provider #AWSreInvent

I used the official Anthropic Terraform provider to create, update and archive Claude Managed Agents for Amazon Bedrock agents. Also covers key Claude Code v2.1.336 updates, like WebFetch's 30-second idle timeout.
2026.12.04

This page has been translated by machine translation. View original

I'm Ishikawa from the Cloud Business Division. Claude Code v2.1.336 (published December 3, 2026 UTC) has been released. Since it contains a large number of changes (182), I'll introduce the notable updates first. On the same day, December 3 (UTC), the first version of Anthropic's official Terraform provider was also released. As a related topic, today I'll use this Terraform provider to create, update, and archive an agent for Claude Managed Agents for Amazon Bedrock.

The previous update article is here.

https://dev.classmethod.jp/articles/20261203-cc-updates-v2-1-335/

Update Summary

v2.1.336 includes 182 changes. By my classification: 17 new features, 3 security, 40 improvements, 6 performance, 113 fixes, and 3 breaking changes. Of these, 83 are VS Code extension changes and 5 are Claude Code on the web changes. 15 changes are for organizations managed by Anthropic's Enterprise Admin Console, including some related to Amazon Bedrock connections.

Also, the Anthropic Terraform provider was released as a public beta. It manages Anthropic organization and Claude Managed Agents resources as code, and specifying platform = "bedrock" lets you create and modify Claude Managed Agents for Amazon Bedrock resources with AWS credentials.

It was also introduced on the official Claude Code X account.

https://x.com/ClaudeDevs/status/2128621163396088106

Notable Updates

New Features

Expanded Amazon Bedrock connections for Enterprise Admin Console-managed organizations

In organizations managed by the Enterprise Admin Console, you can now specify a base URL for each connection to Amazon Bedrock, Mantle, Google Cloud's Agent Platform, and Microsoft Foundry. You can also sign in to an Amazon Bedrock proxy via an identity provider. After an administrator registers the /gateway-sign-in/callback address, users run /login.

Administrators of organizations that use Amazon Bedrock through an internal proxy and distribute Claude Code via the Enterprise Admin Console should check whether they can specify a base URL in the connection settings or switch to identity-provider sign-in.

Hooks and status line added to settings applied from the Enterprise Admin Console

Hooks and the status line are now part of the settings applied to Claude Code from organizations managed by the Enterprise Admin Console. Hooks saved in the console are also covered.

Administrators who want the whole organization to use the same hooks and status line can now consolidate them in the console settings instead of per-device managed settings.

New managed setting allowedAdminConsoleOrgUUIDs

The managed setting allowedAdminConsoleOrgUUIDs was added. It applies the Enterprise Admin Console organization's settings after sign-in and, unlike forceLoginOrgUUID, also allows use of API keys and tokens.

It's worth considering as an alternative to forceLoginOrgUUID when you want to apply organization settings while still allowing API key or token usage.

Improvements and Changes

WebFetch silence timeout shortened to 30 seconds

WebFetch now aborts when no data arrives from a site for 30 seconds (previously 1 minute or more). You can change the limit with CLAUDE_CODE_WEBFETCH_SILENCE_MS, and 0 disables it.

Wait time is shorter when WebFetch reads an unresponsive site, so those running research tasks unattended will likely notice the difference most.

Change to the basis of used_percentage in the status line

The status line's used_percentage and remaining_percentage are now percentages of the auto-compaction window, same as /context (according to the documentation, if auto-compaction is disabled, they are percentages of context_window_size). Because behavior changes, this is also covered under "Breaking Changes and Deprecations" below.

If you display used_percentage in the status line and change colors by threshold, the same number now means something different, so your script needs review.

Bug Fixes

Fix for freezes when editing or overwriting thousands of lines

Fixed the freeze when an edit or overwrite changes thousands of lines. Very long diffs now show a line count, and ctrl+o shows the full diff.

If you have Claude rewrite generated files or large config files, this fix should reduce screen freezes.

Fix for sessions becoming unresponsive

Fixed a rare case where a session stopped responding to prompts without showing an error. This was a regression introduced in v2.1.335.

If you encountered sessions silently stopping in v2.1.335, update to v2.1.336 soon.

Security

Auto mode reviews more commands

Auto mode now reviews more Bash and PowerShell commands.

If you work in auto mode, some commands that previously ran unreviewed may now be covered, so watch for behavior changes.

Updated safety rules for computer use on macOS

Computer use on macOS now follows new safety rules: more clicks are denied, and some apps become view-only.

If you build automation with computer use on macOS, review your procedures assuming some clicks will be denied and some apps will be view-only.

Update Details

New Features

  • Hooks and the status line were added to the settings applied to Claude Code from organizations managed by the Enterprise Admin Console. Hooks saved in the console are also covered
  • In organizations managed by the Enterprise Admin Console, you can now specify a base URL for each connection to Amazon Bedrock, Mantle, Google Cloud's Agent Platform, and Microsoft Foundry
  • In Enterprise Admin Console organizations, you can now sign in to an Amazon Bedrock proxy via an identity provider. After an administrator registers the /gateway-sign-in/callback address, users run /login
  • For organizations managed by the Enterprise Admin Console, /status gained a line showing the AWS profile chosen by the organization and how sign-in relates to the user's own ANTHROPIC_BASE_URL
  • You can now answer permission prompts from in-process agent teammates via Remote Control
  • The /help command list is now searchable, and the search field changed from a bordered box to a single line
  • In Claude Code Desktop's terminal (macOS/Linux), file names and labeled links are now clickable
  • For mods, added $.process.open to keep long-running child processes and view.isScrolledBack to detect whether the fullscreen transcript is scrolled away from the bottom
  • A line is now shown when auto-compaction is abandoned
  • The Artifact tool list now includes the time each artifact was last opened, so Claude can find recently opened ones
  • Added CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MS. In unattended retry mode, subagents that hit certain usage limits can stop waiting instead of waiting for the limit to reset
  • Added BASH_DEFAULT_BACKGROUND_TIMEOUT_MS. Extends the default timeout for background shell commands in the Agent SDK and cloud sessions. Foreground timeouts are unchanged
  • Added the managed setting allowedAdminConsoleOrgUUIDs. It applies the Enterprise Admin Console organization's settings after sign-in and, unlike forceLoginOrgUUID, also allows use of API keys and tokens
  • [VS Code] The sign-in screen's error box gained a "Try again" button to recheck whether Claude Code starts and who is signed in
  • [VS Code] In the new look, MCP tool rows gained a "Request" control showing what Claude sent to the server
  • [VS Code] In the new look, image previews gained an "Open in editor" button to view screenshots at full size in an editor tab
  • [VS Code] Errors after an organization sign-in expires gained a "Sign in again" link

Security

  • Computer use on macOS now follows new safety rules: more clicks are denied, and some apps become view-only
  • Auto mode now reviews more Bash and PowerShell commands
  • [VS Code] The "allow all edits" answer in permission prompts now indicates that it also allows deletions

Improvements and Changes

  • WebFetch now aborts when no data arrives from a site for 30 seconds (previously 1 minute or more). The limit can be changed with CLAUDE_CODE_WEBFETCH_SILENCE_MS, and 0 disables it
  • Improved Glob speed in large repositories. Patterns that specify a folder, such as src/**/*.ts, search only that folder
  • Improved memory usage for resumed terminal sessions, sessions with many MCP servers or Remote Control enabled, long claude -p and Agent SDK sessions, conversations after compaction, and /usage
  • Answering No to the startup --add-dir trust prompt now often starts the session without that directory instead of exiting. Esc still exits as before
  • /model no longer shows retired models, except the one in use
  • On Windows, the 2.1.335 Bash fixes for long commands, path hints, and working folders now also apply to Team, Enterprise, and API key users. disableWindowsBashCommandSplit disables command splitting
  • In Enterprise Admin Console-managed organizations, AWS GovCloud Amazon Bedrock connections without a specified base URL now use FIPS endpoints
  • There are also 39 other improvements and changes, including the /plugin Configure display, the bundled dataviz skill update, the frequency of Claude-drafted feedback, the VS Code extension's new look (33), and Claude Code on the web (3).

Fixes

  • Fixed freezes when editing or overwriting thousands of lines: Very long diffs now show a line count, and ctrl+o shows the full diff
  • Fixed sessions becoming unresponsive: Fixed a rare case where a session stopped responding to prompts without showing an error (regression in 2.1.335)
  • Fixed worktree session exit wait: Fixed worktree session exit hanging for up to 10 minutes at an empty prompt when git was slow or stalled
  • Fixed 30-second waits in subagents and /clear: Fixed subagents and /clear each waiting 30 seconds before the first request in folders where git status is very slow
  • Fixed delayed tool display for HTTP MCP servers: Fixed tools taking up to 25 seconds to appear for HTTP MCP servers whose change-notification stream is never acknowledged (anthropics/claude-code#91414)
  • Fixed repeated work in background sessions: Fixed background sessions after restart repeating work from turns that ended intentionally, such as turns stopped with Esc, prompts cancelled with Esc, and /goal that hit the Stop hook limit
  • Fixed stopped Bash commands continuing on Windows: Fixed scripts and programs they launched (such as a running rm) continuing after the Bash command was stopped
  • Fixed WebFetch falsely reporting blocked domains: Fixed WebFetch reporting a domain as blocked when a proxy returned its own page for the domain safety check
  • Fixed claude plugin update failing without SSH configured: Fixed claude plugin update failing for GitHub plugins in environments without SSH configured. It now falls back to HTTPS (anthropics/claude-code#103638)
  • Fixed /setup-bedrock validation failure: Fixed /setup-bedrock failing to validate profiles or key pairs when AWS_BEARER_TOKEN_BEDROCK is set to an empty value
  • Fixed memory not released after /clear or compaction: Fixed old tool results remaining in memory after /clear and after non-fullscreen compaction
  • Fixed wait on claude -p exit: Fixed claude -p waiting up to 30 seconds on exit when the plugin npm registry refuses connections or can't be resolved
  • Fixed re-execution of completed tool calls: Fixed completed tool calls being run again when permission answers were repeated in sessions with transcripts over 5 MB
  • Fixed stopped commands continuing to run: Fixed commands reported as stopped continuing in the background when Stop or Esc was pressed right after "send now"
  • Fixed hooks disappearing after /reload-plugins: Fixed plugin hooks sometimes being lost after /reload-plugins
  • Fixed approval requests for commands that can't run in the sandbox: Fixed Claude often asking approval for commands that can't work, like npm install, when managed settings give the sandbox no network access
  • A quietly welcome fix: [VS Code] In the new look, fixed words entered via IME right after closing the mode or model menu changing the mode or model or answering a permission request. For those using the VS Code extension with Japanese input, this reduces accidental mode changes and permission answers.
  • Many other small bugs were also fixed, including Remote Control and cloud sessions, sign-in in Enterprise Admin Console-managed organizations, plugins and mods, Windows- and macOS-specific behavior, and VS Code extension display and operation.

Breaking Changes and Deprecations

There are no deprecated items. The following 3 are described as Added, Fixed, and Changed in the CHANGELOG, but they change the behavior of existing settings and scripts, so this article treats them as breaking changes. The before/after below are examples I created based on the CHANGELOG and documentation. Parts marked "inferred" are my inference, since the pre-change behavior isn't documented.

Status line used_percentage and remaining_percentage

The context_window.used_percentage and remaining_percentage passed to the status line are now percentages of the auto-compaction window, same as /context. The status line documentation says "Before v2.1.336, used_percentage was a percentage of context_window_size." If auto-compaction is disabled, they are percentages of context_window_size. The percentage of the whole window is computed as total_input_tokens * 100 / context_window_size.

Before (up to v2.1.335):

pct=$(echo "$input" | jq -r '.context_window.used_percentage // 0')
echo "ctx: ${pct}%"  # Percentage of context_window_size (whole window)

After (v2.1.336 onward):

pct=$(echo "$input" | jq -r '.context_window.used_percentage // 0')  # Percentage of the auto-compaction window
full=$(echo "$input" | jq -r '.context_window.total_input_tokens * 100 / .context_window.context_window_size | floor')
echo "ctx: ${pct}% (window: ${full}%)"

claude plugin validate --strict

claude plugin validate now warns about plugins that have files in the bin/ folder (which claude.ai doesn't accept). Since --strict treats warnings as errors (exit 1), such plugins fail validation with --strict.

Before (up to v2.1.335):

claude plugin validate --strict ./my-plugin  # No warning about files in bin/

After (v2.1.336 onward):

claude plugin validate ./my-plugin           # Warns if bin/ contains files
claude plugin validate --strict ./my-plugin  # Fails for the same plugin (warning treated as error, exit 1)

ANTHROPIC_BASE_URL passed to managed hooks and others

The ANTHROPIC_BASE_URL set by the Enterprise Admin Console organization is no longer passed to managed hooks, managed MCP servers, and credential helpers.

Before (up to v2.1.335):

Managed hooks / managed MCP servers / credential helpers
→ Receive the ANTHROPIC_BASE_URL set by the organization (inferred)

After (v2.1.336 onward):

Managed hooks / managed MCP servers / credential helpers
→ The ANTHROPIC_BASE_URL set by the organization is not passed

Trying the Anthropic Terraform Provider

On December 3, 2026 (UTC), v0.1.0, the first version of Anthropic's official Terraform provider (source anthropics/anthropic), was released. The provider is in public beta.

It manages Anthropic organization and Claude Managed Agents resources as code, and specifying platform = "bedrock" lets you create and modify Claude Managed Agents for Amazon Bedrock resources with AWS credentials. This time I created, updated, and archived the Tokyo-region Claude managed agent from the previous article with Terraform.

Provider Overview

Here are the specs relevant to this test, as confirmed in the official documentation.

Item Details
Source anthropics/anthropic. The documentation says this is the only official source address
Status Public beta. Resource types and arguments may change during the beta
Prerequisites Terraform 1.11 or later and the ant CLI (the ant CLI isn't used with platform = "bedrock" this time)
platform anthropic (default), aws (Claude Platform on AWS), google_cloud (Claude Models on Google Cloud), bedrock (Amazon Bedrock)
Resources usable with bedrock anthropic_beta_bedrock_agent, anthropic_beta_bedrock_memory_store, anthropic_beta_bedrock_memory and their data sources
bedrock authentication AWS default credential chain or aws_profile. Halts if the credentials belong to a different account. Also halts if AWS_BEARER_TOKEN_BEDROCK is set
Not created by the provider IAM roles and Amazon Bedrock projects

anthropic_beta_bedrock_agent requires name, model, and execution_identity. execution_identity is the IAM role used by the agent's sessions and can't be changed after creation. deletion_protection defaults to true.

Test Setup

I created the IAM role and checked the created agent in the console. Writing the Terraform configuration file and running the terraform commands were done in the CLI. As in the previous article, I used Claude Haiku 5.5 with JP cross-region inference.

The test environment is as follows.

% terraform version
Terraform v1.15.8
on darwin_arm64
% aws --version
aws-cli/2.43.2 Python/3.14.10 Darwin/25.6.0 exe/arm64
% aws bedrock list-inference-profiles --region ap-northeast-1 --query "inferenceProfileSummaries[?contains(inferenceProfileId, 'haiku-5-5')].[inferenceProfileId,status]" --output text
jp.anthropic.claude-haiku-5-5	ACTIVE
global.anthropic.claude-haiku-5-5	ACTIVE

Why I Didn't Prepare a Tool Runner

In the previous article, I pushed a tool runner image to ECR, created an AgentCore Runtime with the console's "quick create runtime", and then ran a session. This time I don't create a session, so I didn't prepare ECR or an AgentCore Runtime.

According to the AWS documentation, Claude Managed Agents runs the agent loop and model calls on the service side, while tools such as bash and file operations run in a tool runner in your own account. Where tools run is specified not on the agent but by environment_id when creating a session. The console's "Show invocation code" also passes either an AgentCore Runtime ARN or …/anthropic-self-hosted as environment_id in sessions.create(). anthropic_beta_bedrock_agent has no argument for specifying where tools run either, and with platform = "bedrock" the provider handles only agents, memory stores, and memories.

To run sessions with an agent created in Terraform, prepare one of the following outside Terraform.

Where tools run What's needed (per AWS documentation)
AgentCore Runtime A tool runner image in ECR, an AgentCore Runtime, a role for the tool runner, and the bedrock-agentcore:InvokeAgentRuntime and bedrock-agentcore:StopRuntimeSession permissions on the session role
Your own machine (self-hosted) A tool runner role that only allows connections. The ECR repository and AgentCore Runtime can be omitted

1. Create the Session Role

According to the AWS documentation, the role specified in execution_identity needs the tag ManagedAgentsExecutionRole (value enabled). The trust policy must allow bedrock.amazonaws.com to AssumeRole, and the caller needs iam:PassRole permission. I couldn't find the role the console created in the previous article in IAM, so I followed step 1 of "Set up permissions and prerequisites" in the documentation and created ClaudeManagedAgentsSessionRole in the IAM console.

  1. Choose "Create role", select "Custom trust policy", and paste the following policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "CmaForThisAccountsSessions",
      "Effect": "Allow",
      "Principal": { "Service": "bedrock.amazonaws.com" },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": { "aws:SourceAccount": "<ACCOUNT_ID>" },
        "ArnLike": { "aws:SourceArn": "arn:aws:bedrock:ap-northeast-1:<ACCOUNT_ID>:project/*/anthropic-session/*" }
      }
    }
  ]
}
  1. Under "Add permissions", choose "Create inline policy" and paste the following policy with the name cma-session. The documented policy also has a statement for calling the tool runner (AgentCore Runtime), but since I won't run sessions this time, I kept only the statement for calling the model
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "CallTheModel",
      "Effect": "Allow",
      "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
      "Resource": [
        "arn:aws:bedrock:ap-northeast-1:<ACCOUNT_ID>:inference-profile/*.anthropic.*",
        "arn:aws:bedrock:*::foundation-model/anthropic.*",
        "arn:aws:bedrock:ap-northeast-1:<ACCOUNT_ID>:project/*"
      ]
    }
  ]
}
  1. Name the role ClaudeManagedAgentsSessionRole, add the tag ManagedAgentsExecutionRole = enabled, and create it

2. Write the Terraform Configuration

In the provider block I specified platform = "bedrock", the region, and the account ID, and defined one agent. If workspace_id is omitted, the Amazon Bedrock project default is targeted. The account ID is passed as a variable.

main.tf
terraform {
  required_version = ">= 1.11"
  required_providers {
    anthropic = {
      source  = "anthropics/anthropic"
      version = "~> 0.1.0"
    }
  }
}

variable "aws_account_id" {
  type = string
}

# Claude Managed Agents on Amazon Bedrock (Tokyo region, project is default)
provider "anthropic" {
  platform       = "bedrock"
  aws_region     = "ap-northeast-1"
  aws_account_id = var.aws_account_id
}

resource "anthropic_beta_bedrock_agent" "sample" {
  name        = "terraform-sample-agent"
  description = "Terraform で作成したエージェント"
  model       = { id = "jp.anthropic.claude-haiku-5-5" }
  system      = "あなたは質問に日本語で簡潔に答えるアシスタントです。"
  tools       = [{ agent_toolset_20260401 = {} }]

  execution_identity = {
    aws_role = { role_arn = "arn:aws:iam::${var.aws_account_id}:role/ClaudeManagedAgentsSessionRole" }
  }
}

output "agent_id" {
  value = anthropic_beta_bedrock_agent.sample.id
}

output "agent_version" {
  value = anthropic_beta_bedrock_agent.sample.version
}

3. Run init, plan, and apply

terraform init installs provider v0.1.0 from the Terraform Registry.

% terraform init -no-color
Initializing the backend...

Initializing provider plugins...
- Finding anthropics/anthropic versions matching "~> 0.1.0"...
- Installing anthropics/anthropic v0.1.0...
- Installed anthropics/anthropic v0.1.0 (self-signed, key ID A229288ECF8B0305)
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://developer.hashicorp.com/terraform/cli/plugins/signing
(中略)
Terraform has been successfully initialized!

After confirming that the hash recorded in the lock file .terraform.lock.hcl matched the SHA-256 of the download file shown by the Terraform Registry (terraform-provider-anthropic_0.1.0_darwin_arm64.zip), I saved the plan.

% grep -c 'zh:2638d56c7c1ca246676e09333391ed46a3b394a322389717396ed3afdf02a343' .terraform.lock.hcl
1
% export TF_VAR_aws_account_id=$(aws sts get-caller-identity --query Account --output text)
% terraform plan -no-color -out=tfplan

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # anthropic_beta_bedrock_agent.sample will be created
  + resource "anthropic_beta_bedrock_agent" "sample" {
      + archived_at         = (known after apply)
      + created_at          = (known after apply)
      + created_by          = (known after apply)
      + deletion_protection = true
      + description         = "Terraform で作成したエージェント"
      + execution_identity  = {
          + aws_role = {
              + role_arn = "arn:aws:iam::<ACCOUNT_ID>:role/ClaudeManagedAgentsSessionRole"
            }
        }
      + id                  = (known after apply)
      + model               = {
          + effort        = (known after apply)
          + id            = "jp.anthropic.claude-haiku-5-5"
          + inference_geo = (known after apply)
          + speed         = (known after apply)
        }
      + name                = "terraform-sample-agent"
      + resource_arn        = (known after apply)
      + system              = "あなたは質問に日本語で簡潔に答えるアシスタントです。"
      + tools               = [
          + {
              + agent_toolset_20260401 = {
                  + configs        = (known after apply)
                  + default_config = (known after apply)
                }
            },
        ]
      + updated_at          = (known after apply)
      + version             = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + agent_id      = (known after apply)
  + agent_version = (known after apply)

Warning: Anthropic organization

  with provider["registry.terraform.io/anthropics/anthropic"],
  on main.tf line 16, in provider "anthropic":
  16: provider "anthropic" {

This run reads and changes resources in Amazon Bedrock in ap-northeast-1, on
AWS account <ACCOUNT_ID>.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan"

The plan includes deletion_protection = true as the default value, and a Warning shows the region and account being operated on. Applying the saved plan created the agent with version 1.

# executed_at: 2026-12-04T19:08:40+0900
% terraform apply -no-color "tfplan"
anthropic_beta_bedrock_agent.sample: Creating...
anthropic_beta_bedrock_agent.sample: Creation complete after 1s [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

Warning: Anthropic organization

  with provider["registry.terraform.io/anthropics/anthropic"],
  on main.tf line 16, in provider "anthropic":
  16: provider "anthropic" {

This run reads and changes resources in Amazon Bedrock in ap-northeast-1, on
AWS account <ACCOUNT_ID>.

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

agent_id = "agent_01WFJUwzyW5FjPyXja4eyFe2"
agent_version = 1

4. Check in the Console

In the Amazon Bedrock console under "Agent solutions" → "Claude managed agents" (project default), terraform-sample-agent appeared with the status "Active". Here's what I confirmed on the detail screen.

  • Agent ID and ARN (arn:aws:bedrock:ap-northeast-1:<ACCOUNT_ID>:project/default/anthropic-agent/agent_01WFJUwzyW5FjPyXja4eyFe2)
  • Version v1, model claude-haiku-5-5, and the system prompt as specified in Terraform
  • The role_arn in "Show invocation code" is ClaudeManagedAgentsSessionRole
  • Tools are the default for agent_toolset_20260401 = {}: bash, read, write, edit, glob, and grep are "Always allow", and 7 memory tools such as memory_list are "Always deny"

5. Change system and apply

I changed system as follows and ran plan and apply again.

-  system      = "あなたは質問に日本語で簡潔に答えるアシスタントです。"
+  system      = "あなたは質問に日本語で、3 文以内で答えるアシスタントです。"
% terraform plan -no-color -out=tfplan
anthropic_beta_bedrock_agent.sample: Refreshing state... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # anthropic_beta_bedrock_agent.sample will be updated in-place
  ~ resource "anthropic_beta_bedrock_agent" "sample" {
        id                  = "agent_01WFJUwzyW5FjPyXja4eyFe2"
        name                = "terraform-sample-agent"
      ~ system              = "あなたは質問に日本語で簡潔に答えるアシスタントです。" -> "あなたは質問に日本語で、3 文以内で答えるアシスタントです。"
      ~ updated_at          = "2026-12-04T10:08:41.375727Z" -> (known after apply)
      ~ version             = 1 -> (known after apply)
        # (8 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Changes to Outputs:
  ~ agent_version = 1 -> (known after apply)

(中略)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan"
# executed_at: 2026-12-04T19:09:32+0900
% terraform apply -no-color "tfplan"
anthropic_beta_bedrock_agent.sample: Modifying... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]
anthropic_beta_bedrock_agent.sample: Modifications complete after 0s [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

(中略)

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Outputs:

agent_id = "agent_01WFJUwzyW5FjPyXja4eyFe2"
agent_version = 2

The agent was updated in place without being recreated, and the version became 2. The console's "Versions" also lists v2 and v1, and the system prompt changed to the new text.

6. Check Deletion Protection and destroy

Running destroy with deletion_protection left at its default true produced an error at the plan stage and stopped with exit code 1.

# executed_at: 2026-12-04T19:09:56+0900
% terraform destroy -no-color -auto-approve
anthropic_beta_bedrock_agent.sample: Refreshing state... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

Changes to Outputs:
  - agent_id      = "agent_01WFJUwzyW5FjPyXja4eyFe2" -> null
  - agent_version = 2 -> null

You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.

(中略)

Error: Agent is protected from deletion

  with anthropic_beta_bedrock_agent.sample,
  on main.tf line 22, in resource "anthropic_beta_bedrock_agent" "sample":
  22: resource "anthropic_beta_bedrock_agent" "sample" {

This plan destroys the agent, which archives it, and its deletion_protection
is on. Archiving an agent cannot be undone. A new agent has a new id. New
sessions of this agent, or of an agent that lists this one as a subagent, are
refused.

To let Terraform archive it, set deletion_protection = false, apply that
change, and run the destroy again. To stop managing the agent without
archiving it, remove it from state instead: a `removed` block with `lifecycle
{ destroy = false }`, or `terraform state rm`.

If `terraform show` lists a deposed object for this resource, a forced
replacement created the new agent before archiving the old one
(`create_before_destroy`), and the old one was kept. Configuration does not
reach a deposed object, so turning deletion_protection off cannot release it.
First note the ids of both objects from `terraform show`: once the resource
is removed from state, Terraform no longer holds them. Remove the resource
from state in one of the two ways above, which archives nothing, and then run
`terraform import` with the id of the agent to keep.
# exit_code: 1

As the error message says, I added deletion_protection = false, applied first, and then ran destroy.

   tools       = [{ agent_toolset_20260401 = {} }]
+
+  deletion_protection = false
% terraform plan -no-color -out=tfplan
anthropic_beta_bedrock_agent.sample: Refreshing state... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # anthropic_beta_bedrock_agent.sample will be updated in-place
  ~ resource "anthropic_beta_bedrock_agent" "sample" {
      ~ deletion_protection = true -> false
        id                  = "agent_01WFJUwzyW5FjPyXja4eyFe2"
        name                = "terraform-sample-agent"
        # (10 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

(中略)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan"
% terraform apply -no-color "tfplan"
anthropic_beta_bedrock_agent.sample: Modifying... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]
anthropic_beta_bedrock_agent.sample: Modifications complete after 0s [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

(中略)

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Outputs:

agent_id = "agent_01WFJUwzyW5FjPyXja4eyFe2"
agent_version = 2
# executed_at: 2026-12-04T19:10:07+0900
% terraform destroy -no-color -auto-approve
anthropic_beta_bedrock_agent.sample: Refreshing state... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # anthropic_beta_bedrock_agent.sample will be destroyed
  - resource "anthropic_beta_bedrock_agent" "sample" {
      - created_at          = "2026-12-04T10:08:41.375727Z" -> null
      - created_by          = {
          - role_actor = {
              - arn     = "arn:aws:iam::<ACCOUNT_ID>:role/<CALLER_ROLE>" -> null
              - role_id = "<ROLE_ID>" -> null
            } -> null
        } -> null
      - deletion_protection = false -> null
      - description         = "Terraform で作成したエージェント" -> null
      - execution_identity  = {
          - aws_role = {
              - role_arn = "arn:aws:iam::<ACCOUNT_ID>:role/ClaudeManagedAgentsSessionRole" -> null
            } -> null
        } -> null
      - id                  = "agent_01WFJUwzyW5FjPyXja4eyFe2" -> null
      - model               = {
          - effort = "medium" -> null
          - id     = "jp.anthropic.claude-haiku-5-5" -> null
          - speed  = "standard" -> null
        } -> null
      - name                = "terraform-sample-agent" -> null
      - resource_arn        = "arn:aws:bedrock:ap-northeast-1:<ACCOUNT_ID>:project/default/anthropic-agent/agent_01WFJUwzyW5FjPyXja4eyFe2" -> null
      - system              = "あなたは質問に日本語で、3 文以内で答えるアシスタントです。" -> null
      - tools               = [
          - {
              - agent_toolset_20260401 = {
                  - configs        = [] -> null
                  - default_config = {
                      - enabled           = true -> null
                      - permission_policy = "auto" -> null
                    } -> null
                } -> null
            },
        ] -> null
      - updated_at          = "2026-12-04T10:09:33.317240Z" -> null
      - version             = 2 -> null
    }

Plan: 0 to add, 0 to change, 1 to destroy.

Changes to Outputs:
  - agent_id      = "agent_01WFJUwzyW5FjPyXja4eyFe2" -> null
  - agent_version = 2 -> null
anthropic_beta_bedrock_agent.sample: Destroying... [id=agent_01WFJUwzyW5FjPyXja4eyFe2]
anthropic_beta_bedrock_agent.sample: Destruction complete after 0s

(中略)

Destroy complete! Resources: 1 destroyed.

deletion_protection is a setting for whether Terraform refuses destroy or replacement. Applying this change completed in place, and the version stayed at 2.

The destroy plan showed the caller's IAM role as the creator (created_by). Also, effort and speed of model and the tool permission_policy weren't set in main.tf, but they had the values "medium", "standard", and "auto" respectively.

After destroy, the console showed the status "Archived" with the message "This agent is archived. It can't be modified or used for new sessions."

7. Cleanup

I deleted ClaudeManagedAgentsSessionRole in the IAM console. The role's "Last activity" was "-" (no session was created this time). An archived agent can't be restored and remains in the console list as archived. Also, according to the documentation, values you set are stored in plaintext in the Terraform state, so this state also contains the role ARN and the system prompt.

Impressions

You can create and update Claude managed agents with just AWS credentials, without handling an Anthropic API key, so it fits well into existing AWS permission management. On the other hand, this provider can't create the IAM role for execution_identity, so I'd design on the assumption that the role is prepared beforehand by other means.

Conclusion

Of the 182 changes, 83 are for the VS Code extension and 15 are for Enterprise Admin Console-managed organizations, so I think terminal-only users have fewer items to check than it appears. The efficient approach is to first check the breaking changes section and the fixes for features you use.

If you run research tasks with WebFetch or have built your own status line, give the update a try. If you use Claude managed agents on Amazon Bedrock, give the Terraform provider a try as well.

References

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

https://code.claude.com/docs/en/changelog

https://code.claude.com/docs/en/statusline

https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/terraform

https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/terraform/authentication

https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/terraform/behavior

https://github.com/anthropics/terraform-provider-anthropic

https://docs.aws.amazon.com/bedrock/latest/userguide/claude-managed-agents-bedrock-account-setup.html

https://docs.aws.amazon.com/bedrock/latest/userguide/claude-managed-agents-bedrock-api-reference.html

https://dev.classmethod.jp/articles/20261203-cc-updates-v2-1-335/


AWS re:Invent 2026まとめ情報

クラスメソッドは2026/11/30〜12/4にラスベガスで開催されるAWSカンファレンスイベント「re:Invent」を今年も特集しました。ぜひ一度ご覧ください。 re:Invent 2026ポータルサイトを見るAWS re:Invent公式サイトはこちら

Share this article

AWSのお困り事はクラスメソッドへ