anthropics/claude-agent-sdk-python v0.1.74
anthropics/claude-agent-sdk-python
Captured source
source ↗published May 6, 2026seen Jun 26captured 3whttp 200method plain
v0.1.74
Repository: anthropics/claude-agent-sdk-python
Tag: v0.1.74
Published: 2026-05-06T01:53:13Z
Prerelease: no
Release notes:
New Features
- Hook event streaming: Added
include_hook_eventsoption toClaudeAgentOptions. When set, hook events (PreToolUse, PostToolUse, Stop, etc.) are emitted by the CLI and yielded from the message stream asHookEventMessage, matching the TypeScript SDK'sincludeHookEvents(#917) - Defer hook decision: Added support for the
"defer"hook decision inPreToolUseHookSpecificOutput.permissionDecisionand newDeferredToolUsedataclass onResultMessage.deferred_tool_use, bringing parity with the TypeScript SDK's deferred tool use round trip (#865) - Strict MCP config: Added
strict_mcp_configoption toClaudeAgentOptions. WhenTrue, the CLI only uses MCP servers passed viamcp_servers, ignoring project, user, and global MCP configurations for fully deterministic server sets (#915) - Permission context enrichment: Added
decision_reason,blocked_path,title,display_name, anddescriptionfields toToolPermissionContext, enabling richer permission prompts incan_use_toolcallbacks (#909) - `updatedToolOutput` for post-tool hooks: Added
updatedToolOutputtoPostToolUseHookSpecificOutputfor replacing any tool's output before it reaches the model, not just MCP tools (#911) - `xhigh` effort level: Added
"xhigh"to theeffortLiteral onClaudeAgentOptionsandAgentDefinition, an Opus 4.7-specific level that falls back tohighon other models (#914) - Subprocess cleanup on parent exit: Registered an atexit handler to terminate live CLI subprocesses when the parent process exits, preventing orphaned
claudeprocesses from leaking (#916)
Bug Fixes
- ResourceWarning on disconnect: Fixed
ResourceWarning: Unclosedemitted onClaudeSDKClientdisconnect andquery()cleanup by closing the receive stream at the consumer boundary (#908) - Session `created_at` timestamp: Fixed
list_sessions()returningcreated_at=Nonefor sessions whose first JSONL record lacks atimestampfield by scanning the full head buffer instead of only the first line (#907)
Documentation
- Clarified that
can_use_toolfires only on"ask"permission decisions, not on"allow"or"deny"(#912)
Internal/Other Changes
- Updated bundled Claude CLI to version 2.1.129
---
PyPI: https://pypi.org/project/claude-agent-sdk/0.1.74/
pip install claude-agent-sdk==0.1.74