{"version":"2.1.327","anchor":"session-restoresave-scripts-and-environment-start-for-self","canonical_anchor":"session-restoresave-scripts-and-environment-start-for-self","heading":"Self-hosted runners can restore and save work between sessions","tier":"notice","area":"Self-Hosted Runners","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/session-restoresave-scripts-and-environment-start-for-self","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Self-hosted runners can restore and save work between sessions\n\nOn self-hosted runners, Claude Code can run restore scripts on resume, a save script on stop, and an `environment-start.sh` script\n\n**Unclear.** It is not clear how these scripts are switched on or where a runner has to put them.\n\n**What**\n\nA self-hosted runner is a machine you run yourself to host Claude Code sessions. Claude Code now has support there for three kinds of scripts:\n\n- Restore scripts, run when a session is resumed\n\n- A save script, run when Claude stops\n\n- `environment-start.sh`, run as the environment starts\n\nIf one of these fails, Claude Code reports that it \"did not go through\".\n\n**Why**\n\nWork on a self-hosted runner can be kept from one session to the next.\n\n- Area: Self-Hosted Runners\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: org\n- Heads-up: no"}