Anthropic Python SDK v1.6.0 Released: Managed Agents, Compaction, and More

Anthropic Python SDK v1.6.0 adds agent permissions and context compaction while fixing async retry bugs.
Anthropic Python SDK v1.6.0 balances feature previews with stability hardening. New capabilities include auto mode tool permissions for Managed Agents, a beta compaction parameter with signed compaction blocks for long-context token management, and url_sources support for the web fetch tool. On the stability side, retry logic received systematic fixes — including proper handling of Retry-After values over 60 seconds and a critical async coroutine retry blocking bug fix — significantly improving reliability for high-concurrency production workloads. The SDK also adds async credential token provider support and raises the minimum anyio version to 4.1.
Anthropic's official Python SDK has reached v1.6.0. This release brings meaningful improvements across API capabilities, client stability, and developer experience — most notably around permission management for Managed Agents and a new Compaction mechanism for context compression, signaling Anthropic's continued investment in long-context and agentic engineering.

Highlights: Expanded API Capabilities for Agents
The most noteworthy additions in this release revolve around Managed Agents. The SDK now supports auto mode tool permissions, allowing managed agents to more flexibly control tool-calling permissions in automatic mode. For developers building autonomous agents, this means agents can decide when and which tools to invoke — without sacrificing security boundaries.
The other core addition is the compaction parameter and signed compaction blocks (beta). Context compression is a key technique for managing token budget bloat in long conversations and multi-step tasks. The introduction of "signed compaction blocks" indicates that Anthropic wants to preserve the integrity and verifiability of compressed context — a particularly important property for enterprise scenarios that require auditing and trusted execution. The documentation also corrects the description of the compaction beta parameter, reflecting that this feature is still in rapid iteration.
Web Fetch Enhancements and Data Residency
The SDK adds url_sources support to the web fetch tool, giving models more explicit control over which sources to use during web retrieval. Combined with geographic field enum types for workspace data residency, Anthropic is offering finer-grained control for customers with strict data compliance requirements. A new workspace_id parameter has also been added to user configuration methods, strengthening management granularity in multi-workspace scenarios.
Background on Context Compaction: Large language models have a context window limit. In long conversations or multi-step Agent tasks, accumulated message history continuously consumes token budget, eventually hitting the limit or causing inference costs to skyrocket. Context compression refers to a class of techniques that "distill" existing conversation history into a more compact representation — typically by having the model generate a summary of earlier content, then replacing the original message list with that compressed summary. "Signed compaction blocks" add a cryptographic or structured signature on top of this, making compressed content verifiable as coming from a trusted source and free from tampering. This provides a trust foundation for enterprise audit trails and compliance logging. It is fundamentally different from a simple rolling truncation strategy: truncation permanently loses information, whereas signed compaction blocks can be traced back to prove pre-compression integrity when needed.
Client Stability: Systematic Fixes to Retry Logic
Beyond new features, a series of client-level bug fixes in this release reflect the SDK's growing maturity. The retry mechanism received the most concentrated improvements:
- The client now respects
Retry-Aftervalues exceeding 60 seconds, avoiding premature retries caused by the previous hard cap; - Invalid
Retry-Aftervalues are now silently ignored, andmaxRetriesis now validated, improving fault tolerance; - When
Retry-Afterexceeds a reasonable range, the client falls back to the default backoff strategy; - The async client now retries on connection errors, and a blocking issue in the coroutine retry loop has been fixed.
That last point is especially critical. In async contexts, a blocking retry loop drags down the throughput of the entire event loop. This fix makes the async client far more resilient under network instability — a tangible benefit for server-side applications making high-concurrency calls to the Claude API.
About Retry-After: Retry-After is a standard HTTP response header. When a server returns a 429 (Too Many Requests) or 503 (Service Unavailable), it uses this header to tell the client how many seconds to wait before retrying. Previously, the SDK hard-capped this value at 60 seconds — meaning if the server requested a longer wait (e.g., during a longer rate-limit window), the client would still retry too early, potentially worsening the rate limiting. This fix makes the client faithfully honor the server-declared wait time, while defensively ignoring malformed Retry-After values (such as non-numeric strings), and automatically falling back to exponential backoff when the value is out of a reasonable range — meaning retry intervals grow exponentially to avoid hammering the server during high-load periods.
Async Support and Dependency Governance
The client also adds support for async credential token providers, meaning developers can now dynamically acquire and refresh authentication credentials asynchronously — a much better fit for modern cloud-native authentication flows. On the dependency side, the SDK raises the minimum anyio version to 4.1, and upgrades aiohttp, pygments, and pytest in the development lockfile, reflecting ongoing attention to the async ecosystem and security updates.
Documentation and Internal Quality Improvements
Several documentation improvements are included: most docstrings have been converted to Markdown format for better readability in IDEs; the session_thread_id field in tool use events is clarified as informational only; and union type documentation no longer inherits descriptions from the first variant, reducing ambiguity. These may seem like minor tweaks, but they meaningfully reduce the cognitive overhead developers face when integrating with the API.
About anyio and Python's Async Ecosystem: anyio is an async compatibility layer that allows code to run seamlessly on both asyncio (Python's standard library) and Trio async runtimes. Anthropic's SDK relies on anyio to unify async I/O, timeout, and cancellation logic. Raising the minimum version to 4.1 means the SDK can use the more stable Task Group and structured concurrency APIs introduced in that version — but it also requires users' environments to meet the corresponding version requirement. Projects still on anyio 3.x should evaluate dependency compatibility before upgrading. The addition of async credential token providers aligns well with cloud-native authentication patterns (such as AWS IAM temporary credentials and Kubernetes Workload Identity), where credentials have a limited lifetime and need to be refreshed asynchronously in the background — synchronous blocking retrieval would become a performance bottleneck in these scenarios.
What This Means for Developers
Taken together, v1.6.0 is a release that balances feature previews with stability hardening. The beta additions around Managed Agent permissions and compaction signal that Anthropic is making agent orchestration and long-context management a major focus for the next phase; the retry and async fixes raise the reliability bar for production deployments.
For teams building Claude-powered applications with the Python SDK, two things are worth prioritizing: First, async client users will see immediate, clear benefits from the retry blocking fix — the upgrade case is straightforward. Second, teams with data compliance requirements or agentic autonomy needs can start experimenting with the compaction and Managed Agents beta capabilities early, but should be aware that their APIs may still change.
Related articles

Uber Deploys ChatGPT Work Company-Wide: AI in the Workplace Enters the Scaled Implementation Phase
Uber deploys ChatGPT Work to 30,000+ employees, extending it from engineering to all roles. We analyze its expert-engineer pairing, end-to-end automation, and questions of AI control and power concentration—insights for scaling AI in the workplace.

Shift at Midnight Hands-On: When "ID Verification" Becomes Alien Hunting
Shift at Midnight blends ID verification with horror survival in a four-player co-op game. We break down its inspection mechanics and chaotic humor.

Zelensky Recounts the Outbreak of War: I Need Ammunition, Not a Ride
Zelensky recalls the first day of war in a YouTube interview: farewell to family, rejecting Biden's evacuation offer with "I need ammunition, not a ride," and how Bucha shaped his stance on compromise and peace talks.