{"version":"2.1.309","anchor":"runner-detects-turns-that-begin-before-init-with-a-stall-wa","canonical_anchor":"runner-detects-turns-that-begin-before-init-with-a-stall-wa","heading":"Self-hosted runner notices sessions that start working before they finish starting up","tier":"notice","area":"Self-Hosted Runners","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309\/e\/runner-detects-turns-that-begin-before-init-with-a-stall-wa","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309","markdown":"### Self-hosted runner notices sessions that start working before they finish starting up\n\nThe self-hosted runner now detects a turn that begins before a session has initialized; `CLAUDE_RUNNER_DISABLE_TURN_BEGAN_BEFORE_INIT` turns it off\n\n**What**\n\nThe self-hosted runner now recognises when a session child, the separate Claude Code process it starts for each session, begins a turn (a round of work) before it has finished initializing. It picks this up from either of two signals:\n\n- a message on the activity channel, the line of communication between the child and the runner\n\n- a startup marker the child prints to its error output\n\nBefore, the runner only treated startup as done once the child reported it had initialized.\n\nUntil the child has initialized, the `--startup-timeout-min` timer now counts from the child's last line on the activity channel. How the runner handles an idle session was also reworked: when no turn is open, it sends a turn-end or a deferred end. Setting the environment variable `CLAUDE_RUNNER_DISABLE_TURN_BEGAN_BEFORE_INIT` turns the new detection off.\n\n**Why**\n\nThis changes when a self-hosted runner considers a session busy or stuck while it is starting, so a session that starts working early is less likely to be treated as hung.\n\n- Area: Self-Hosted Runners\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: org\n- Heads-up: no"}