{"version":"2.1.307","anchor":"checkout-hook-runner-process-tree-stop-timeout-and-pipe-ho","canonical_anchor":"checkout-hook-runner-process-tree-stop-timeout-and-pipe-ho","heading":"Self-hosted runner checkout hooks can time out and are stopped cleanly","tier":"use","area":"Self-Hosted Runner","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307\/e\/checkout-hook-runner-process-tree-stop-timeout-and-pipe-ho","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307","markdown":"### Self-hosted runner checkout hooks can time out and are stopped cleanly\n\nThe self-hosted runner's checkout hook can now be given a time limit with `--checkout-hook-timeout-min`, and is stopped when it runs over\n\n**Unclear.** Whether there is a default time limit when `--checkout-hook-timeout-min` is not set is not settled.\n\n**What**\n\nThe self-hosted runner can run a checkout hook, a script of your own that runs when work is checked out. That hook can now be given a time limit with the `--checkout-hook-timeout-min` option. Claude Code now:\n\n- on an abort or timeout, asks the hook and every process it started to stop, then forces them to stop if they do not\n\n- fails with a \"checkout hook timed out\" error when the time limit is reached\n\n- reports when a process the hook started is still holding its output open after the hook has finished, and advises that a hook should `exec` or `wait` for its long-running commands\n\n**Why**\n\nA stuck checkout hook can no longer hold one of the runner's slots forever, and the logs now say why a slot is still held.\n\n- Area: Self-Hosted Runner\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: org\n- Heads-up: no"}