New Features
on_failureoption forHookMatcher: Control what happens when a hook callback fails. Seton_failure="block"to block the action when a callback raises, returnsNone, 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 withon_failure="block"raisesCLIConnectionError(#1460)
Internal/Other Changes
- Updated bundled Claude CLI to version 2.1.317
- Tests: e2e tests now accept either
BashorPowerShelltool 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