{"version":"2.1.318","anchor":"cloud-sessions-and-spawn-reason-in-the-runner","canonical_anchor":"cloud-sessions-and-spawn-reason-in-the-runner","heading":"Self-hosted runners now pass on why a session was started","tier":"use","area":"Self-Hosted Runner","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/cloud-sessions-and-spawn-reason-in-the-runner","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Self-hosted runners now pass on why a session was started\n\nSelf-hosted runners now set `CLAUDE_RUNNER_SPAWN_REASON`, and the `--cloud` remote backend choice needs one more condition\n\n**What**\n\nA self-hosted runner is a machine you run yourself that starts Claude Code sessions on request. When the runner starts a session, it now sets the environment variable `CLAUDE_RUNNER_SPAWN_REASON` to the reason given in the start request. An environment variable is a named value a program can read when it starts. The value is only set after a check allows it. If the check rejects the value, the runner logs that and leaves the variable unset.\n\nWith `--cloud`, the choice to use the remote backend for a cloud session now needs one more condition to hold. That choice still sits behind a server-side switch that is off unless it is switched on remotely.\n\n**Why**\n\nIf you operate a runner, the sessions it starts can now see why they were started. Your own scripts or setup can read that and act on it.\n\n- Flag `tengu_remote_backend`: Not enough to say (read for one account on one subscription tier against v2.1.318; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\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"}