{"version":"2.1.318","anchor":"sdk-reports-spawn-time-to-onprocessspawned","canonical_anchor":"sdk-reports-spawn-time-to-onprocessspawned","heading":"The SDK's onProcessSpawned callback now reports how long the start took","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/sdk-reports-spawn-time-to-onprocessspawned","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### The SDK's `onProcessSpawned` callback now reports how long the start took\n\nThe SDK now passes `spawnSyncMs`, the time taken to start the Claude Code process, as a second argument to `onProcessSpawned`\n\n**What**\n\nThe SDK is the kit for running Claude Code from your own programs. It starts Claude Code as a separate process and can call your `onProcessSpawned` callback, a function you supply, once that process exists. The callback used to get only the process ID. It now also gets a second argument, `{ spawnSyncMs }`, with how long starting the process took in milliseconds.\n\n**Why**\n\nYou can measure how long Claude Code takes to start without timing it yourself.\n\n- Area: SDK\n- Names: `onProcessSpawned`, `spawnSyncMs`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}