github anthropics/claude-agent-sdk-python v0.2.177

4 hours ago

New Features

  • on_failure option for HookMatcher: Control what happens when a hook callback fails. Set on_failure="block" to block the action when a callback raises, returns None, or returns a value the CLI rejects. Defaults to "continue" (treat failure as no decision). Requires a CLI version that supports this option; connecting to an older CLI with on_failure="block" raises CLIConnectionError (#1460)

Internal/Other Changes

  • Updated bundled Claude CLI to version 2.1.317
  • Tests: e2e tests now accept either Bash or PowerShell tool in shell-dependent tests, fixing intermittent failures on Windows (#1467)

PyPI: https://pypi.org/project/claude-agent-sdk/0.2.177/

pip install claude-agent-sdk==0.2.177

Don't miss a new claude-agent-sdk-python release

NewReleases is sending notifications on new releases.