GrepBoard/Manuals
605 manuals ·

Claude API 409 conflict_error: causes and how to retry

·Tested on Claude API official docs · 2026-11·Test scope ↓·6 steps

Claude API 409 conflict_error: the request clashed with a resource's state. Tell concurrent edits, duplicates and a stale version apart, re-read, then retry.

text
409 - conflict_error: The request conflicts with the current state of a resource. For example, the resource was modified concurrently, or a value that must be unique is already in use. Resolve the conflict, then retry the request.

A 409 conflict_error means your request does not fit the current state of the target resource. The official errors page gives two examples: the resource was modified concurrently, or a value that must be unique is already in use. Resending the same request is not the fix; the docs say to resolve the conflict first, then retry. In the Python SDK it surfaces as anthropic.ConflictError.

[1] Work out which call returned it. In the official docs read for this article, every place that explains a 409 is a call that creates, changes or deletes a resource the server keeps: Managed Agents agents, vault credentials, memory stores and organization webhook endpoints. None of them says a message-creating call such as POST /v1/messages returns a 409. Note the request_id from the body and the URL and method you called.

[2] If you updated an agent, check version. On a Managed Agents agent update, a version that differs from the stored current version returns a 409, even when the fields you sent already match the stored values. The documented order is:

1. Read the agent again and take its current version. 2. Check that your change is still needed; another caller may have made the same change. 3. Send the update again with the new version.

[3] If you created a vault credential, check for a duplicate key. Within one vault, mcp_server_url (MCP credentials) and secret_name (environment variable credentials) must be unique among active credentials, and creating a duplicate returns a 409. These keys are immutable, so to change one, archive the credential and create a new one.

[4] If you use memory stores, check preconditions and overlapping runs. The docs list three 409 cases:

CallWhen you get a 409
Update a memoryThe precondition (content_sha256) in the request does not match the current content hash
Delete a memoryThe expected_content_sha256 query parameter differs from the current hash. Nothing is deleted
Run a dream with update_existingAn earlier update_existing dream on the same memory store has not fully stopped yet

For the first two, read the memory again and send the request with the new content_sha256. Dropping the condition makes the request unconditional, with the same caveat as in [2]. For the third, wait for the earlier dream to stop, then start again.

[5] If it is an organization webhook endpoint, check for a shared URL. A 409 comes back when a request would make two enabled endpoints share a URL, and also when another request changed your organization's endpoints at the same time. The docs say to retry the latter.

[6] Know what the SDK retries on its own. Per the official SDK docs, connection errors, 408, 409, 429 and 500 and above are retried 2 times by default. So with default settings, a ConflictError that reaches your code has been sent three times in all: the first attempt plus 2 retries (the delay is described only as a short exponential backoff). A conflict that does not clear by itself, such as a stale version or a duplicate value, returns the same 409 on an identical resend, so re-read, fix the value and send again as in [2] to [4]. A transient conflict from overlapping requests (concurrent webhook endpoint changes, an upload still in progress in the Plugins API) is one the docs say to retry shortly. To change the count:

python
client = Anthropic(max_retries=0)  # default is 2

The Plugins API and the Compliance API also return 409, each with its own error table in its docs (for example plugin_name_taken), so check that table if you use them. If none of the above fits, keep the request-id header and send it with the request URL and method when you contact support.

Other status codes: Claude API 404 not_found_error, 504 timeout_error and 529 overloaded_error.

#claude#api#409#conflict_error#managed-agents