766 pages for errors.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
sent_count = len(messages sent in the compaction request)
Claude Developer Platform · in the page
build-with-claude/compaction
…e`. Retry the request. Other rejections specific to this beta are 400 errors, and most have a message that says what to remove or resend. The exception is a request that leaves out the beta header: it…
compaction-on-demand
Claude Developer Platform · in the page
build-with-claude/compaction-on-demand
…-stop-reasons#refusal) identifies the policy category behind it. ### Errors A compaction request, or a request that carries a block, can also fail outright. Most 400 errors have a message that says…
compaction-thinking-blocks
Claude Developer Platform · in the page
build-with-claude/compaction-thinking-blocks
…or was dropped. A [400 error](https://platform.claude.com/docs/en/api/errors#thinking-block-conversation-mismatch) that says the block is bound to a different conversation means one did. The message s…
context-editing
Claude Developer Platform · in the page
build-with-claude/context-editing
…3. **Important Discoveries:** Technical constraints, decisions made, errors resolved, and failed approaches. 4. **Next Steps:** Specific actions needed, blockers, and priority order. 5. **Context to…
context-windows
Claude Developer Platform · in the page
build-with-claude/context-windows
…returns a [validation error](https://platform.claude.com/docs/en/api/errors) instead. To opt in to the `model_context_window_exceeded` behavior on those models, use the `model-context-window-exceeded…
effort-per-message
Claude Developer Platform · in the page
build-with-claude/effort-per-message
…azon-bedrock-legacy#mid-conversation-system-messages-on-bedrock). ## Errors * Without the beta header, a per-message `output_config` returns a 400 error: `messages.N.output_config: Extra inputs are…
fallback-credit
Claude Developer Platform · in the page
build-with-claude/fallback-credit
…nute window. canFallBack := func(err error) bool { apiErr, ok := errors.AsType[*anthropic.Error](err) return ok && apiErr.StatusCode == 400 && !strings.Contains(apiErr.Error(), "redemption…
fast-mode
Claude Developer Platform · in the page
build-with-claude/fast-mode
…### Automatic retries The SDK automatically retries fast mode `429` errors up to two times by default (configurable with `max_retries` (typescript, php: `maxRetries`; java: `.maxRetries()`; csharp:…
files
Claude Developer Platform · in the page
build-with-claude/files
…nts beta versions receive the plain shape. ## Error handling Common errors when using the Files API include: * **File not found (404):** The specified `file_id` doesn’t exist or you don’t have acce…
handling-stop-reasons
Claude Developer Platform · in the page
build-with-claude/handling-stop-reasons
…ason` field is part of every successful Messages API response. Unlike errors, which indicate failures in processing your request, `stop_reason` tells you why Claude completed its response generation.…
message-threads
Claude Developer Platform · in the page
build-with-claude/message-threads
…to a different conversation](https://platform.claude.com/docs/en/api/errors#thinking-block-conversation-mismatch)). See [Which models run the prefix check](https://platform.claude.com/docs/en/build-w…
mid-conversation-effort-example
Claude Developer Platform · in the page
build-with-claude/mid-conversation-effort-example
…"context" "crypto/sha256" "encoding/hex" "encoding/json" "errors" "fmt" "log" "os" "os/exec" "path/filepath" "strings" "sync" "time" "github.com/anthropics/anth…
mid-conversation-system-messages
Claude Developer Platform · in the page
build-with-claude/mid-conversation-system-messages
…` included. See **Resend cleared messages verbatim**. The validation errors are: ```text wrap messages.3.clear_at: Extra inputs are not permitted messages.3.clear_at: clear_at is only permitted on r…
preserved-thinking
Claude Developer Platform · in the page
build-with-claude/preserved-thinking
…| A run with no errors on your own API key doesn’t prove that your code keeps the prefix intact. When a request to Claude Fable 5.1, Claude Opus 5…
fix-bound-to-a-different-conversation
Claude Developer Platform · in the page
build-with-claude/preserved-thinking/fix-bound-to-a-different-conversation
…still holds what your code changed. Send `"drop_block"` to [stop the errors now](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/fix-bound-to-a-different-conversation#prefix-…
prefix-checks
Claude Developer Platform · in the page
build-with-claude/preserved-thinking/prefix-checks
…ion#drop-block-cost). Don’t send it on all your conversations to hide errors. ## Technical details ### How the prefix check works The models with preserved thinking record a fingerprint of each thi…
claude-prompting-best-practices
Claude Developer Platform · in the page
build-with-claude/prompt-engineering/claude-prompting-best-practices
…ou finish, verify your answer against \[test criteria].” This catches errors reliably, especially for coding and math. Claude Opus 5 is the exception: it verifies its own work well without explicit in…
Delivering work
Claude Developer Platform · in the page
build-with-claude/prompt-engineering/prompting-claude-fable-5-1
…t not result in a [400 error](https://platform.claude.com/docs/en/api/errors#thinking-block-conversation-mismatch). To identify and handle both cases, see [Prefix checks on thinking blocks](https://pl…
Finishing work
Claude Developer Platform · in the page
build-with-claude/prompt-engineering/prompting-claude-fable-5-2
…fix-check) gets a [400 error](https://platform.claude.com/docs/en/api/errors#thinking-block-conversation-mismatch). If you resume a stored conversation after you change `system`, `tools`, or an earlie…
prompting-claude-opus-5-5
Claude Developer Platform · in the page
build-with-claude/prompt-engineering/prompting-claude-opus-5-5
…al model and one-page summary for a transaction or finding and fixing errors in a valuation workbook, and it catches details that are easy to miss in large inputs, such as a date in a long planning th…
prompting-claude-sonnet-5-5
Claude Developer Platform · in the page
build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5
…. The model usually corrects the call on its next turn. See [Handling errors with `is_error`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls#handling-errors-with-is-er…
refusals-and-fallback
Claude Developer Platform · in the page
build-with-claude/refusals-and-fallback
…and include the [request ID](https://platform.claude.com/docs/en/api/errors#request-id). ## How refusals are billed These billing rules apply on every platform. **Refusals before any output:** To…
search-results
Claude Developer Platform · in the page
build-with-claude/search-results
…type="text", text="If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.",…
skills-guide
Claude Developer Platform · in the page
build-with-claude/skills-guide
…es the Skill’s description. ### Error handling Handle Skill-related errors gracefully: <CodeGroup exclude="shell:cURL, shell:CLI"> <CodeGroupItem language="cURL"> This error-handling flow nee…
streaming
Claude Developer Platform · in the page
build-with-claude/streaming
…of `ping` events. ### Error events The API might occasionally send [errors](https://platform.claude.com/docs/en/api/errors) in the event stream. For example, during periods of high usage, you might…
structured-outputs
Claude Developer Platform · in the page
build-with-claude/structured-outputs
…cations. Even with careful prompting, you might encounter: * Parsing errors from invalid JSON syntax * Missing required fields * Inconsistent data types * Schema violations requiring error handling a…
thinking
Claude Developer Platform · in the page
build-with-claude/thinking
…(see [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported)). On earlier models, you can’t prefill the assistant response while thinking is on. Forced tool use…
thinking-troubleshooting
Claude Developer Platform · in the page
build-with-claude/thinking-troubleshooting
…g description: "Diagnose and fix thinking failures: configuration 400 errors, empty or missing thinking blocks, max_tokens stops, and cache misses." --- <Note> To learn how zero data retention (ZDR…
working-with-messages
Claude Developer Platform · in the page
build-with-claude/working-with-messages
…e the [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported) section of the Claude API errors page). Use one of the [alternatives to a prefill](https://platform.…
claude_api_primer
Claude Developer Platform · in the page
claude_api_primer
…essages API requests with text and images, thinking, tool use and its errors, JSON output, and streaming. The instructions on this page are for whoever sends the request, and “Claude” is the model tha…
scripting
Claude Developer Platform · in the page
cli-sdks-libraries/cli/scripting
…the benefits of type safety in one sentence. Type safety catches errors at compile time rather than runtime, reducing bugs, improving code clarity, enabling better tooling support, and making cod…
using
Claude Developer Platform · in the page
cli-sdks-libraries/cli/using
…/platform.claude.com/docs/en/cli-sdks-libraries/cli/scripting#inspect-errors) | | `--google-cloud-*` | Settings for [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs…
apple-foundation-models
Claude Developer Platform · in the page
cli-sdks-libraries/libraries/apple-foundation-models
…r image requirements. ## Error handling The package maps Claude API errors onto Apple’s `LanguageModelError` cases where one fits: context-window overflow surfaces as `.contextSizeExceeded`, HTTP 42…
openai-sdk
Claude Developer Platform · in the page
cli-sdks-libraries/libraries/openai-sdk
…. Most unsupported fields are silently ignored rather than producing errors. These are all documented in the following sections. ### Output quality considerations If you’ve adjusted your prompt ext…
middleware
Claude Developer Platform · in the page
cli-sdks-libraries/middleware
…request options argument, and how middleware interacts with retries, errors, and request signing, see [Middleware in the PHP SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/php#middl…
csharp
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/csharp
…Exception`. [SDK error types](https://platform.claude.com/docs/en/api/errors#sdk-error-types) lists the cases (including errors in a stream), and [Handle errors](https://platform.claude.com/docs/en/ap…
go
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/go
…hich is useful for troubleshooting with Anthropic support. To handle errors, use the `errors.As` pattern: ```go _, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ MaxTokens:…
java
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/java
…cribe(chunk -> { IO.println(chunk); }); // If you need to handle errors or completion of the stream client.async().messages().createStreaming(params).subscribe(new AsyncStreamResponse.Handler<>()…
php
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/php
…xx or 5xx). [SDK error types](https://platform.claude.com/docs/en/api/errors#sdk-error-types) lists the classes, and [Handle errors](https://platform.claude.com/docs/en/api/handle-errors) shows how to…
For Amazon Bedrock support
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/python
…the file contents are read asynchronously automatically. ## Handling errors The SDK raises a subclass of `anthropic.APIError` when it can’t connect to the API or when the API returns an error respon…
Automatically handles tool execution loop
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/ruby
…laude.com/docs/en/build-with-claude/structured-outputs). ## Handling errors The SDK raises a subclass of `Anthropic::Errors::APIError` when it can’t connect to the API or when the API returns an err…
behavior
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/terraform/behavior
…While protection is on, the apply fails even if the plan ran without errors. Before the apply stops, it can destroy resources that depend on the protected resource. To turn protection off first, see…
typescript
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/typescript
…: [weatherTool] }); console.log(finalMessage.content); ``` ### Tool errors To report an error from a tool back to the model, throw a `ToolError` from the `run` function. Unlike a plain `Error`, `To…
access-transparency-log
Claude Developer Platform · in the page
manage-claude/access-transparency-log
…Access Transparency is not this case: it continues to be served. ### Errors Errors use the standard Compliance API JSON error envelope on every endpoint, including the text and binary ones. See [Han…
List your profiles. An asterisk marks the active one.
Claude Developer Platform · in the page
manage-claude/admin-api
…eaningful names and descriptions for workspaces and API keys * Handle errors from failed operations * Regularly audit member roles and permissions * Archive unused workspaces and delete pending invite…
claude-tag-api
Claude Developer Platform · in the page
manage-claude/claude-tag-api
…Error responses follow the standard shape documented in [Claude API errors](https://platform.claude.com/docs/en/api/errors). Quote the `request_id` from the response body when contacting support. |…
cmek
Claude Developer Platform · in the page
manage-claude/cmek
…ailable](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-sessions-temporarily-unavailable) instead of transcript content. Session metadata is still listed. * Office agents. *…
cmek-aws-kms
Claude Developer Platform · in the page
manage-claude/cmek-aws-kms
…bs> Each check of the key in Claude adds four expected access-denied errors to CloudTrail. You can [filter them out](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cloudtrail)…
cmek-coverage-claude-enterprise
Claude Developer Platform · in the page
manage-claude/cmek-coverage-claude-enterprise
…ailable](https://platform.claude.com/docs/en/manage-claude/compliance-errors#local-sessions-temporarily-unavailable) instead of transcript content. Session metadata is still listed. * Backups and snap…
cmek-how-it-works
Claude Developer Platform · in the page
manage-claude/cmek-how-it-works
…s it as a prerequisite. In AWS CloudTrail, some entries are [expected errors](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cloudtrail). Changes to your CMEK configuration ap…