{"version":"2.1.328","anchor":"self-hosted-runner-repository-folder-support-at-capacity","canonical_anchor":"git-sources-can-use-a-repository-folder-directory-in-the-r","heading":"Self-hosted runner can use your own repository folders with --repository-folder","tier":"use","area":"Self-Hosted Runner","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328\/e\/self-hosted-runner-repository-folder-support-at-capacity","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328","markdown":"### Self-hosted runner can use your own repository folders with --repository-folder\n\nThe self-hosted runner gains --repository-folder and SELF_HOSTED_RUNNER_REPOSITORY_FOLDER to use existing checkouts at capacity 1, plus clearer fatal errors\n\n**What**\n\nA self-hosted runner is a program you run on your own machine to host Claude Code cloud sessions. It can now be pointed at repository folders you already have, instead of making a fresh copy (worktree) for each session.\n\n- A new repeatable `--repository-folder` flag, and the `SELF_HOSTED_RUNNER_REPOSITORY_FOLDER` variable, take a comma list in the form `<owner>\/<repo>=<folder>` or `<owner>\/*=<folder>\/*`. Other shapes are rejected.\n\n- It only works at `--capacity` 1. There the runner checks the folders at startup and rules out its own paths, such as its program path, hooks folder, log file, pool secret and client certificate and key. A conflict stops it with a `[runner:fatal]` line.\n\n- Above capacity 1 it warns: \"--repository-folder does nothing at --capacity above 1: sessions get worktrees of their own\".\n\n- If a checkout hook prepares the repository, the folder is ignored and a warning is logged.\n\n- Processes the runner starts have `SELF_HOSTED_RUNNER_REPOSITORY_FOLDER` cleared from their environment.\n\nOther runner changes found with it:\n\n- A fatal startup error is logged as a `[runner:fatal]` line, reported against any assigned sessions with a 4 second timeout, and the runner deregisters with a matching reason.\n\n- If every repository was added after the session was created and none could be prepared, the session now starts with no repository instead of failing. Skipped repositories carry a reason.\n\n- Git clean-up failures are reported as a filesystem setup failure.\n\n- After a crash, the saved error output keeps the runner's own words.\n\n- While waiting to drain, busy-session counts come from a different session list.\n\n- The standalone agent proxy is now handled as a separate case.\n\n**Why**\n\nOperators running a single-session runner can work in their own checkouts. Misconfigured folders now fail clearly at startup rather than causing confusing session errors.\n\n- Area: Self-Hosted Runner\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: org\n- Heads-up: no"}