

# Troubleshoot Claude Managed Agents

Read the response body, the session's events, and the tool runner's log together. A request can succeed before the agent or its tool runner is ready to do the work. On AgentCore, the tool runner's log is in CloudWatch Logs, in the log group named for your runtime under `/aws/bedrock-agentcore/runtimes/`. Self-hosted, it goes to the terminal.

## Every request returns HTTP 404
<a name="claude-managed-agents-bedrock-troubleshooting-every-request-returns-http-404"></a>

If every path returns HTTP 404 `no such route`, check the base URL, which ends in `/anthropic/v1`, and that its Region is one in [Supported Regions and endpoints](claude-managed-agents-bedrock.md#claude-managed-agents-bedrock-endpoints). A request without the `anthropic-beta` header returns HTTP 404 with the message `This API requires the managed-agents-2026-04-01 value in the anthropic-beta header.`

A 404 `no such session` or `no such agent` means the ID is not in this account and project. Check the `anthropic-workspace-id` header: a resource is found only in the project it was created in. If you send `x-amz-role-arn` on a session route, it must be the session's own role, which is the role in the session's `execution_identity`. Otherwise the message reads `no such session, or it was created with a different role than x-amz-role-arn`. A 400 `session_id is not a valid session id` (or the same for an agent or memory store) means the ID is not one the service issues: check that it was copied whole. A 404 `the project does not exist` means the project in `anthropic-workspace-id` does not exist in this account and Region.

A 400 `the project is archived` means the project was archived. You can still list, read, and archive its agents, sessions, and memory stores, list agent versions, and delete its sessions and memory stores. You can still redact memory versions, list and remove tags, and get the encryption configuration. Nothing in it can be created or otherwise changed, and its sessions take no events.

## Requests return HTTP 401 or 403
<a name="claude-managed-agents-bedrock-troubleshooting-requests-return-http-401-or-403"></a>

Run `aws sts get-caller-identity` with the profile you sign with. Confirm that:

1. The identity is an assumed role. Requests signed by an IAM user or the root user get 403.

1. The signature uses the service name `bedrock` and the endpoint's Region, and sends the session token.

1. The role has the actions it calls. A 403 for a missing permission names the identity that signed, the action, and the resource. See [Security and IAM roles](claude-managed-agents-bedrock-security.md).

1. For an agent create, an agent update that sets the role, or a session create that names a role, the caller may pass that role, with `iam:PassedToService` set to `bedrock.amazonaws.com`. A session that inherits its agent's role needs no `iam:PassRole`.

1. The session role is in your own account. A role in another account returns 403 `the role in ... belongs to another account`, naming the role field or `x-amz-role-arn`, wherever you sent it.

A 403 `This service is not available for this account. For access options, contact AWS Sales` is not a permissions problem. Contact AWS Sales or your AWS account team, as the message says.

The role you deploy stacks with is not always the role your application signs with. Check `AWS_PROFILE` in each terminal.

If assuming the caller role fails with `AccessDenied ... sts:AssumeRole`, the identity you assume it from needs its own `sts:AssumeRole` permission on that role. See [Step 5: Give your applications permission to call the API](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-5-give-your-applications-permission-to-call-the-api).

## Requests return HTTP 429
<a name="claude-managed-agents-bedrock-troubleshooting-requests-return-http-429"></a>

A 429 `rate_limit_error` with the message `rate limit exceeded; retry after a brief delay` and `retry-after: 1` means your account is over one of its request rates (see [Rate limits](claude-managed-agents-bedrock-reference.md#claude-managed-agents-bedrock-reference-rate-limits)). Wait `retry-after` seconds, then retry with backoff.
+ Do not retry a 403 or a 404 in a loop. Fix the policy or the ID first.
+ Retry a 429 after `retry-after`, with backoff, not at once.

A tool runner that logs `this account is dialing faster than its connect quota allows; retrying later` is connecting too often. The tool runner waits and connects again by itself.

## Creating a session returns HTTP 400
<a name="claude-managed-agents-bedrock-troubleshooting-creating-a-session-returns-http-400"></a>


| Message | Cause | 
| --- | --- | 
| `the role could not be assumed` | The session role does not exist, its trust policy does not match the one in [Step 1: Create the session role](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-1-create-the-session-role), or it lacks the tag `ManagedAgentsExecutionRole` with the value `enabled`. The message names what to check. | 
| `environment_id must be a runtime in your own account` or `... where this endpoint runs` | The runtime is in another account or Region. | 
| `environment_id must be this project's self-hosted id` | The self-hosted ID names another project. It is the project ARN followed by `/anthropic-self-hosted`. | 
| `Missing required tool` | The agent has skills or the session has `sandbox_path`, `s3_mount`, or `s3_object` resources, and the agent's `read` tool is off. | 
| `unknown field` | A field this API does not take, such as `vault_ids`. See [How this API differs from Anthropic's Managed Agents API](claude-managed-agents-bedrock-api-reference.md#claude-managed-agents-bedrock-api-reference-differences). | 
| `"user.define_outcome" is not available on this platform` | Outcomes aren't available. Send the goal as a `user.message` instead. A send of the event to an existing session returns the same error. | 
| `is not available on this platform` | A `configs` entry of the built-in tools names `web_fetch` or `web_search`. Remove the entry. For web search, use the [Web Search Tool](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-connector-web-search-tool.html) through an AgentCore Gateway instead, as in the `web-search` example. | 
| `model must be an Amazon Bedrock inference profile ID` | The session's `agent_with_overrides` names a Claude model name such as `claude-sonnet-5-5`, a model ID with no geography such as `anthropic.claude-sonnet-5-5`, or an inference profile ARN. Name the inference profile ID instead, such as `us.anthropic.claude-sonnet-5-5`, `eu.anthropic.claude-sonnet-5-5`, or `global.anthropic.claude-sonnet-5-5`. An agent create or update returns the same error. | 
| `model is not supported` | The model is not one the endpoint offers. | 
| `the agent must have exactly one execution role` | The agent has no role, or is an older agent with more than one role. Update the agent's role, then create the session. | 
| `use role_arn to specify the agent's single execution role` | The body names `allowed_role_arns`, which this API doesn't take, or spells `role_arn` another way. Name the role in `execution_identity`. | 
| `role_arn must name the agent's execution role` | An agent create names no role, or an empty one. Every agent needs one. | 
| `specify the execution role with role_arn or execution_identity, not both` | The body names the role twice. Send `execution_identity` alone. | 
| `execution_identity must be an object with type aws_role and a role_arn` | `execution_identity` is not `{"type": "aws_role", "role_arn": "<role ARN>"}`, or has another field. | 
| `spell execution_identity exactly as execution_identity` | `execution_identity` is spelled another way, such as `Execution_Identity`. | 

## Tags or a memory store's fields return HTTP 400
<a name="claude-managed-agents-bedrock-troubleshooting-tags-or-a-memory-store-s-fields-return-http-400"></a>

Creates that set tags, the tag routes, and a memory store's create and update can return these errors.


| Message | Cause | 
| --- | --- | 
| `unknown field: <name>` | A memory store's create or update, or a tag route's body, names a field it does not take, such as a misspelled `tags` (`tag`, `tgas`), or `tags` on an update. Set a store's tags when you create it, or with its tag routes. | 
| `a resource's AWS tags are tags, spelled so` | A create names `tags` in another letter case, such as `Tags`. | 
| `tags names two keys that differ only in letter case` | The tags name two keys IAM reads as one, such as `team` and `Team`. Keep one spelling. | 
| `a tag key differs only in letter case from one the resource has: remove that tag before setting its key in another case` | A tag change adds a key the resource already has in another case. Use the key's existing spelling, or untag it first. | 

## The first message returns HTTP 400, 429, or 503
<a name="claude-managed-agents-bedrock-troubleshooting-the-first-message-returns-http-400-429-or-503"></a>

The service starts the session's container when you send the first message, so problems with the runtime appear here. AgentCore counts its rate limits and quotas against the account that owns the runtime, which is yours.

The service waits up to 20 seconds for the container. A container that takes longer to start, such as one with a large image, does not hold your request: the message is accepted and the turn begins while the container finishes starting. If it then fails to start, the turn's first tool call reports that no sandbox was available, and your next message starts the container again. In a session with S3 folders or files, a failed start lists `session.error` events instead, and the turn ends before the model is called (see [S3 folders and files fail](#claude-managed-agents-bedrock-troubleshooting-s3-folders-and-files-fail)).


| Message | Cause | 
| --- | --- | 
| 429 `AgentCore throttled this account's calls to its AgentCore Runtime; retry shortly` | Your account went over AgentCore Runtime's rate for new sessions or for data plane calls. Retry after `retry-after` seconds. | 
| 429 `this account is over an AgentCore Runtime quota, such as its active session workloads; ...` | Your account has as many active AgentCore Runtime sessions as its quota allows. Delete sessions you no longer need, or request an increase in Service Quotas. | 
| `the AgentCore Runtime named by this environment does not exist, or the session role is not allowed to invoke it` | The runtime ARN is wrong, or the session role lacks `bedrock-agentcore:InvokeAgentRuntime` on it. The session role's policy names only a runtime called `cma_tool_runner`. | 
| `the session role is not authorized to invoke the AgentCore Runtime named by this environment` | The session role's policy does not allow `bedrock-agentcore:InvokeAgentRuntime` on the runtime and `<runtime ARN>/runtime-endpoint/*`. | 
| `AgentCore Runtime refused to activate the runtime ...: HTTP 400 ValidationException` | AgentCore refused the call for another reason. The status and AWS error type are AgentCore Runtime's own answer to `InvokeAgentRuntime`. | 
| `the AgentCore Runtime named by this environment could not start its container` | The image could not be pulled or did not start. Check the tool runner role's ECR permissions and the image tag, and read the runtime's log. | 
| `the tool runner in this runtime's image speaks control protocol ...` or `does not speak control protocol ...` | The image holds an older or newer tool runner than the service. Rebuild the image with the tool runner from the current bundle, and update the runtime. | 
| `the tool runner in this runtime's image could not make the session's working directory ... ready` | The tool runner creates a missing working directory, and couldn't: a file is at that path, or the user the tool runner runs as may not create a folder there. Create it in the `Dockerfile`, or set the session's `working_directory` to one that user may create. An image built from an older tool runner doesn't create it; rebuild from a current one. | 
| 503 `the container behind this environment is not a compatible tool runner` | The image's entrypoint does not start `cma-tool-runner agentcore`. Retry; if it persists, check the entrypoint. | 
| 503 `the AgentCore Runtime could not be activated` | AgentCore failed or could not be reached. Retry. | 

## S3 folders and files fail
<a name="claude-managed-agents-bedrock-troubleshooting-s3-folders-and-files-fail"></a>

[Errors](claude-managed-agents-bedrock-s3-folders-and-files.md#claude-managed-agents-bedrock-s3-folders-and-files-errors), in Use S3 folders and files, lists each `session.error` type that a folder or file reports when it could not be put in place, with what to check.


| What you see | Cause | 
| --- | --- | 
| 400 `S3 entries (s3_mount, s3_object) need an environment_id that names an AgentCore Runtime: ...` | The session is self-hosted. S3 folders and files need an AgentCore Runtime. | 
| 400 `S3 entries (s3_mount, s3_object) need an AgentCore Runtime on platform version V2: ...` | The runtime is on platform version V1. Move it to V2, or name a V2 runtime. The service keeps a runtime's platform version for up to five minutes, so a runtime you have just moved to V2 can still be refused for that long. | 
| Every folder fails as `s3_mount_error` and every file as `s3_copy_error` | The runtime is on platform version V1, or its image was not built from `Dockerfile.s3-mounts`. A session on a V1 runtime is created, rather than refused, when the session role may not read the runtime (`bedrock-agentcore:GetAgentRuntime`) or the session names a runtime endpoint. | 
| A folder fails as `s3_access_denied_error` although it mounts, or a `read_write` folder that worked fails once it holds a file | The role may list the folder but not read its objects. Each start reads one object of each folder, so the role needs `s3:GetObject` on the folder's objects, and `kms:Decrypt` on the key if the bucket uses SSE-KMS. | 
| One `s3_mount_error` whose path is null, `The sandbox was not ready in time, so its S3 folders and files may be missing`, on every turn of a session with S3 entries | The container did not start, or its tool runner is from before S3 folders and refused the session's list. Rebuild the image from the current bundle with `Dockerfile.s3-mounts`, update the runtime, and read the runtime's log. | 
| A session whose file has a name with `!`, `'`, `(` or `)`, or beginning with `.` or `_`, lists `The sandbox could not be started`, and the runtime's log says `control request failed` with `UnsupportedProtocolVersion` | The image's tool runner is from a bundle before such names. Rebuild the image from the current bundle, and update the runtime. | 
| `mv`, `sed -i`, or saving an xlsx, docx, pptx, or zip file fails on a mount, or a file is left empty | S3 stores whole objects, so a mounted folder does not support rename, append, or change in place. Build the file in the working directory, then copy it in with `cp`. | 

## A turn fails
<a name="claude-managed-agents-bedrock-troubleshooting-a-turn-fails"></a>


| What you see | Cause | 
| --- | --- | 
| `session.error` of an `s3_` type, `mount_path_conflict_error`, or `working_directory_error`, then `session.status_idle` with `retries_exhausted` | An S3 folder or file could not be put in place. See [S3 folders and files fail](#claude-managed-agents-bedrock-troubleshooting-s3-folders-and-files-fail). | 
| `session.error`, then `session.status_idle` with `retries_exhausted` | A model request failed. If every turn does this, check the session role's `bedrock:InvokeModel` permissions and model access in the Region. Send another message to retry. | 
| Every turn on a Claude Fable agent ends in `model_request_failed_error` | The account's data retention mode is not `aws_review`. See [Step 6: Allow AWS review if your agents use Claude Fable](claude-managed-agents-bedrock-account-setup.md#claude-managed-agents-bedrock-account-setup-step-6-allow-aws-review-if-your-agents-use-claude-fable). | 
| A `400` `invalid_request_error` answer to `POST /sessions/{id}/events`: `this session's container stopped and cannot be started again ... Create a new session` | The session's container exited, for example because its process was killed. A session without S3 folders or files gets a new container on its next message, but one with them can't, because your policies hold its folders to that container's `${aws:AgentCoreRuntimeSourceSid}`. Create a new session. Files in the old container's file system are gone. Anything the session wrote to Amazon S3 is still there. | 
| Tool calls time out | The tool runner was not connected. Self-hosted, start it before the first message. On AgentCore, read the runtime's log. | 
| A tool call fails with an error from the command | The command ran. Read the tool result. The program it needs may be missing from the image. | 
| An MCP call fails | The session role lacks `bedrock-agentcore:InvokeGateway` on the gateway, or the gateway refused the call. | 

## A session stays running
<a name="claude-managed-agents-bedrock-troubleshooting-a-session-stays-running"></a>

Check whether a command is still running in the tool runner, and read the events for the last `agent.tool_use`. A long command keeps the turn going until it ends. To stop it, send `user.interrupt`. An interrupt does not undo what tools already did. A running session cannot be deleted or archived. Interrupt it first.

## Deleting a session or memory store returns HTTP 503 or 429
<a name="claude-managed-agents-bedrock-troubleshooting-deleting-a-session-or-memory-store-returns-http-503-or-429"></a>

A delete that returns one of these deleted nothing, and the same delete succeeds when you send it again.


| Message | Cause | 
| --- | --- | 
| 503 `api_error` `the delete could not be completed, and nothing was deleted; retry` | A service that the delete depends on didn't answer. Retry with backoff. | 
| 429 `the delete was throttled, and nothing was deleted; retry after a brief delay` | The delete was briefly throttled. Retry after `retry-after` seconds. | 
| 429 `the resource was being changed at the same moment, and nothing was deleted; retry` | Another change to the resource, such as a tag change or another delete, was in progress. Retry after `retry-after` seconds. | 

## The stream shows nothing
<a name="claude-managed-agents-bedrock-troubleshooting-the-stream-shows-nothing"></a>

The stream sends events as they happen, so it is quiet while the session is idle. Open it before you send a message, and read it as server-sent events, not as one JSON document. Lines that begin with `:` are keep-alive comments. To see what already happened, list the events.

The stream answers at once with a `: connected` line and then sends a comment every 15 seconds. If even `: connected` never arrives while the other calls work, something between you and the endpoint is holding the response back. A corporate proxy that inspects TLS commonly does this. Do one of the following:
+ If your security policy allows it, ask your network team to let server-sent event responses from `bedrock.<region>.amazonaws.com` pass through the proxy without buffering.
+ Call the API from inside AWS, such as from a VPC or through a VPC endpoint.
+ List the session's events every few seconds instead of streaming them. Everything the stream sends is also in the list.

The service closes a stream that has carried no event for 10 minutes. List the events, then open it again.

## A skill is not used
<a name="claude-managed-agents-bedrock-troubleshooting-a-skill-is-not-used"></a>

Check that the skill's `SKILL.md` exists at the path the agent names, inside the tool runner, not on the machine you deploy from. On AgentCore the skill must be in the image, so push a new image tag and deploy the runtime again after you change it. A session that is already running keeps its container. Create a new session to pick up the new image. The service lists skills whenever the agent has the `bash` tool, whatever its permission policy.

A skills folder in S3 needs no new image. The service lists a session's skills when the session is created, so a skill you add to the folder is listed in the sessions you create after that.

## The self-hosted tool runner does not connect
<a name="claude-managed-agents-bedrock-troubleshooting-the-self-hosted-tool-runner-does-not-connect"></a>

See [If the tool calls fail](claude-managed-agents-bedrock-self-hosted.md#claude-managed-agents-bedrock-self-hosted-if-the-tool-calls-fail) in [Run the tool runner in a self-hosted environment](claude-managed-agents-bedrock-self-hosted.md).

## The CloudFormation stack fails
<a name="claude-managed-agents-bedrock-troubleshooting-the-cloudformation-stack-fails"></a>


| What you see | Cause | 
| --- | --- | 
| A role or the policy `already exists` | The template names its roles and policy. Delete the ones you made by hand, or deploy into an account without them. | 
| The runtime fails to create | Read the resource's status reason. Usually the image tag does not exist in the repository, or the runtime name is taken. | 

## Information to retain for support
<a name="claude-managed-agents-bedrock-troubleshooting-information-to-retain-for-support"></a>

Record the AWS Region, the approximate time in UTC, the `x-amzn-requestid` of the failing request, the session ID, the HTTP status, and the error message. For tool problems, add the environment type, the tool runner's version, and its log. Remove credentials, prompts, and tool data you cannot share first.