Every kof22 turn failed on its first model call with Anthropic 400
invalid_request_error "The compiled grammar is too large ... reduce the
number of strict tools". All ten read tools were strict, and the API
compiles every strict schema of a request into one grammar.
- Tools are not strict by default; hosts opt in with strictToolNames.
The kernel validates every tool input (INVALID_INPUT) anyway.
- If a provider still refuses strict schemas, the turn retries once
without strict tools and logs a warning.
- Provider errors carry the API error type, a sanitized message and the
request id: logged at WARN on 4xx, request id kept on the usage row,
the reason shown to assistant.admin holders and in Test connection.
- TurnEngine also catches Errors, so a turn never ends silently.
- AnthropicRequestContractTest checks the exact request against the
Messages API constraints and a conservative strict-tool budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>