You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SDKArea: what it touches
ImprovementsKind: in v2.1.327,
ImprovementsSection of the release
What
Before the Agent SDK (the library for running Claude Code from your own program) starts a session, it now checks two kinds of options:
hooks: each entry must be a list of matchers, and each matcher must have its own list of hooks. Hooks are your own commands that run at set points in a session.
each initConfig value.
If one is malformed, the session is not started and the error names the option that could not be sent, for example that a hooks entry must be an array of matchers.
Why
A mistake in your hook setup now shows up straight away with a clear message pointing at the problem, instead of surfacing later in a harder-to-read way.