Anthropic-sdk-python v1.5.0: do not mistake idempotency_key for duplicate-operation protection

An idempotency_key argument in a request is not, by itself, a reason to replay a workflow safely. For teams using anthropic-sdk-python v1.5.0, that distinction is explicit in the release notes: the client keeps the request option as a deprecated no-op.

The practical decision is whether your retry path relies on that option to prevent duplicate work. If it does, audit that assumption before permitting automatic retries around side effects.

What the release actually establishes

The v1.5.0 release notes, dated September 10, 2026 in the changelog heading, include two relevant entries under Chores:

  • Clean up the unused idempotency request option.
  • Keep the idempotency_key request option as a deprecated no-op, with a link to issue #621.

That is a narrow client-library statement. Keeping the option does not establish duplicate-operation protection. Equally, these notes do not prove that every server endpoint lacks deduplication, specify retry defaults, or establish when the option first became ineffective. Do not turn this into a claim that v1.5.0 newly broke a previously guaranteed safeguard.

Audit the retry boundary, not just the argument

Consider an application that requests model output and then uses it to create a ticket. This is an illustrative workflow, not a reported incident. There are two different questions: whether another model request is acceptable, and whether the ticket-creation step may run again. An SDK request option should not be treated as proof of protection for that downstream action.

A focused integration audit would cover:

  1. Find the assumption. Search application wrappers, request-option builders, and tests for idempotency_key. Identify any code or documentation that treats its presence as permission to retry. Removing a deprecated argument is cleanup; it is not the replacement safety mechanism.
  2. Identify the actual effect. Separate model-request attempts from the business operation they serve. Decide which action must not be repeated and where its outcome can be checked.
  3. Record the logical operation. Use a durable application-owned identity and explicit pending, completed, and uncertain outcomes. Concurrent attempts should not independently claim the same operation. Keep completed results available where appropriate so a repeated caller can receive the existing outcome instead of triggering the effect again.
  4. Verify the downstream contract. If the side-effecting service offers deduplication, confirm its scope, retention window, and behavior for a repeated key with different input. Do not infer those properties from this SDK release.
  5. Reconcile before replay. If an acknowledgement is lost, check the destination’s operation state where possible. If the effect cannot be determined, hold that operation for reconciliation rather than automatically treating uncertainty as failure.

A local record alone does not make an external action atomic: the action could complete before the application records success. The retry design still needs a verified destination-side mechanism or a way to resolve that gap. These are application-design recommendations, not guarantees supplied by v1.5.0.

An acceptance check worth adding

In a controlled test environment, exercise both simultaneous attempts for one logical operation and a simulated effect that completes just before its acknowledgement is lost. Check the number of effects, not merely whether both client calls returned successfully.

The intended acceptance condition should be explicit: a repeated operation either returns the recorded result, is prevented from duplicating the effect by a verified mechanism, or remains visibly uncertain with automatic replay blocked. A test that only confirms idempotency_key is accepted does not establish that condition.

No runtime tests are claimed here. The release-note takeaway is enough to justify a targeted audit: base retry permission on verified operation state and an actual duplicate-control mechanism, not on the continued existence of this request option.

For a content-production pipeline, I would add an approval boundary to this retry audit. Preventing a second publication is not enough if the one publication contains a different revision from the one an editor approved.

Consider an illustrative workflow that generates a caption, obtains approval, then sends it to a publishing service. I would separate three identities: the generation attempt, the approved caption revision, and the intended publication. A retry of the publication step should use the stored approved caption—not rerun generation and publish whatever comes back under the same job label.

A concrete handoff record could bind the approved text or artifact checksum, destination, scheduled slot, and approval reference to the logical publication ID. If any of those inputs changes, I would stop the retry and require an explicit revision decision. That check belongs in the application; it should not depend on an SDK request argument.

The extra acceptance test I would propose is: approve caption A, interrupt the publication handoff, then make caption B the latest draft before resuming. Resumption must either send the still-authorized A or stop for review. Sending B once should fail the test even though the duplicate-effect count is one. Destination-side duplicate controls and uncertain-outcome reconciliation are still needed separately.

This is a proposed editorial control, not behavior promised by anthropic-sdk-python v1.5.0 or a tested publishing integration. It extends the audit from “did the effect happen twice?” to “did the effect use exactly the approved content?”