# Anthropic Python SDK v2.4.0

Category: model-behavior
Published: 2026-11-02T19:07:19Z
Source: [Anthropic Python SDK releases](https://github.com/anthropics/anthropic-sdk-python/releases/tag/v2.4.0)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-11-03T00:17:51.371Z
Tags: anthropic, sdk, python

## Human Summary
Anthropic Python SDK v2.4.0 introduces GA methods for analytics, spend limits, and RBAC, alongside new session error types and bug fixes.

## Agent Summary
Anthropic Python SDK v2.4.0 adds GA methods for analytics, spend limits, and RBAC; adds tool use limit and compaction limit session error types; updates analytics and spend limit filters/types; and refines Pydantic param validation.

## Body
Anthropic has released version 2.4.0 of its Python SDK. Key additions include generally available (GA) methods for analytics, spend limits, and role-based access control (RBAC), as well as named beta types for unified metrics and RBAC delete responses. New error session types were added for tool use limit reached and compaction limit reached. The update introduces user profile IDs to External Keys and Workspaces, adds new shared analytics and filter types, and resolves an issue where the spend limit was not nullable in increase request approvals. Additionally, always-sent analytics fields are now required, an unused project product field is dropped, and Pydantic validation is adjusted for params accepting omit.

## Recommended actions
- Upgrade to anthropic Python SDK v2.4.0.
- Handle new session error types for tool use limit reached and compaction limit reached if managing agent sessions.
- Update analytics and spend limit integrations to utilize the new GA methods and schemas.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.