{"version":"2.1.282","anchor":"sdk-output-schema-validation-is-now-built-lazily-on-an-idle","canonical_anchor":"sdk-output-schema-validation-is-now-built-lazily-on-an-idle","heading":"SDK output format checks now start only after the session goes idle","tier":"internal","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282\/e\/sdk-output-schema-validation-is-now-built-lazily-on-an-idle","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282","markdown":"### SDK output format checks now start only after the session goes idle\n\nSampled checks of SDK output against its expected format now wait until the first result is written and the session is idle\n\n**What**\n\nWhen Claude Code runs under the SDK (the programming interface for driving Claude Code from other software) or with `--print`, it occasionally checks a sample of its output messages against the expected output format. Building the description of that format used to happen right away, every time a sampled message was written.\n\nNow the format description is built later, on a timer that starts after the first result message is written, and only while the session is idle. Sampled checks run only once it exists. If building it fails, the failure is logged and checking stays off until the next attempt.\n\n**Why**\n\nThis takes a costly step out of the path that writes output, which should keep SDK and `--print` sessions from slowing down on it. The trade-off is that messages written before the first idle result are no longer checked.\n\n- Area: SDK\n- Names: `--print`\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}