{"version":"2.1.318","anchor":"spawn-hook-logs-now-include-the-spawn-reason","canonical_anchor":"spawn-hook-logs-now-include-the-spawn-reason","heading":"Session spawns now carry a spawn reason into the runner's logs","tier":"notice","area":"Self-Hosted Runner","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/spawn-hook-logs-now-include-the-spawn-reason","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Session spawns now carry a spawn reason into the runner's logs\n\nRemote session spawns now pass a spawn_reason, and the self-hosted runner's spawn-hook log lines include it\n\n**What**\n\nTo spawn a session is to start a new one. A spawn hook is a command run when that happens. The self-hosted runner, a machine you operate yourself that runs Claude Code sessions, now records why each session was started.\n\n- The spawn context now carries `spawn_reason` when it is text, and an empty string otherwise.\n\n- The runner's spawn-hook log lines now include `reason=` with that value, on both success (`ok`) and refusal (`nack`) lines. Before, they had no reason field.\n\n- A new `onServerIdleLimit` callback is connected to the fetch of remote configuration.\n\n**Why**\n\nIf you operate a self-hosted runner, the logs now show why each session was started. That makes it easier to work out why a spawn succeeded or was refused.\n\n- Area: Self-Hosted Runner\n- Names: `reason=`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: no"}