{
  "@context": "https://schema.org",
  "@id": "https://aggr.aymericbeaumet.com/items/ampcode-com/2026-09-22-one-runner-many-worktrees/#webpage",
  "@type": [
    "WebPage",
    "ArchiveComponent"
  ],
  "articleBody": "A [runner](https://ampcode.com/docs/cli/runners) can now create Git worktrees. Pick a repository the runner serves, hit Tab, name the branch, and the thread starts in a fresh checkout. Your main checkout stays untouched.\n\n![The new thread composer on ampcode.com with the runner mac-mini selected and the directory picker open. The amp repository is highlighted and offers Current or New Worktree.](https://static.ampcode.com/news/one-runner-many-worktrees-picker-dark.png)\n\nIn the directory picker, every Git checkout on the runner gets a **New Worktree** option next to it. Choose it and you get a small form:\n\n![The worktree form in the new thread composer: New worktree of amp, name fix-flaky-login-test, directory ~/code/amp-fix-flaky-login-test, branch fix-flaky-login-test, from current HEAD, and a Create Worktree button](https://static.ampcode.com/news/one-runner-many-worktrees-form-dark.png)\n\nThe name you chose becomes the branch name and the folder name. The runner then creates the worktree as a sibling of the repository: `~/code/amp` gets `~/code/amp-fix-flaky-login-test`, checked out on a new branch `fix-flaky-login-test` off the current `HEAD`. Uncommitted changes stay where they are, in the original checkout. The new directory shows up in the picker right away, marked with a branch icon, and the thread starts in it.\n\n[Puck](https://ampcode.com/docs/puck) can do this too: ask it to start a thread on your runner in a new worktree and it passes a `worktree` name to `create_thread`.\n\n## Clean Up When You're Done\n\nA thread that runs in a worktree the runner created gets a new action: **Archive and Remove Worktree**. It archives the thread, runs `git worktree remove`, and deletes the branch.\n\n![The thread actions menu on ampcode.com with a new entry, Archive and Remove Worktree, between Archive and Delete](https://static.ampcode.com/news/one-runner-many-worktrees-menu-dark.png)\n\n## New Folders and Projects Too\n\nThe picker can also create things. Type the name of a directory that doesn't exist yet and you get **New Directory** or **New Project**. [Read more.](https://ampcode.com/docs/cli/runners#create-a-directory-or-project)\n\n![The directory picker in the new thread composer with a name typed that doesn't exist yet, offering New Directory and New Project](https://static.ampcode.com/news/one-runner-many-worktrees-create-dark.png)\n\n## Oh, They Understand Secrets Now Too\n\nRunners can also use the [Secrets & Env Vars](https://ampcode.com/docs/orbs/handling-secrets) you configure on ampcode.com. Same variables that orbs get. It's off by default; opt in with `--amp-env`:\n\n```shell-session\n$ amp --no-tui --runner-id mac-mini --discover-dirs --amp-env\n```\n\nEvery time a thread starts, the runner fetches the variables that apply to it (personal, then project, then workspace) and adds them to the environment of the thread's shell commands, MCP servers, and plugins. Change a variable on ampcode.com and the next thread gets the new value. No restart, no SSH.\n\nBoth need a runner on the current Amp version. If yours has been running for a while, it has [updated itself](https://ampcode.com/docs/cli/runners#keep-a-runner-updated) already.\n\nRead more about [worktrees](https://ampcode.com/docs/cli/runners#create-a-worktree) and [Secrets & Env Vars](https://ampcode.com/docs/cli/runners#secrets-env-vars) in the runner docs.\n",
  "authors": [],
  "captured_at": "2026-10-03T23:09:50.514863041+00:00",
  "category": "programming",
  "content_html": "<p>A <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/cli/runners\">runner</a> can now create Git worktrees. Pick a repository the runner serves, hit Tab, name the branch, and the thread starts in a fresh checkout. Your main checkout stays untouched.</p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://static.ampcode.com/news/one-runner-many-worktrees-picker-dark.png\" alt=\"The new thread composer on ampcode.com with the runner mac-mini selected and the directory picker open. The amp repository is highlighted and offers Current or New Worktree.\" loading=\"eager\" decoding=\"async\" fetchpriority=\"high\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<p>In the directory picker, every Git checkout on the runner gets a <strong>New Worktree</strong> option next to it. Choose it and you get a small form:</p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://static.ampcode.com/news/one-runner-many-worktrees-form-dark.png\" alt=\"The worktree form in the new thread composer: New worktree of amp, name fix-flaky-login-test, directory ~/code/amp-fix-flaky-login-test, branch fix-flaky-login-test, from current HEAD, and a Create Worktree button\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<p>The name you chose becomes the branch name and the folder name. The runner then creates the worktree as a sibling of the repository: <code>~/code/amp</code> gets <code>~/code/amp-fix-flaky-login-test</code>, checked out on a new branch <code>fix-flaky-login-test</code> off the current <code>HEAD</code>. Uncommitted changes stay where they are, in the original checkout. The new directory shows up in the picker right away, marked with a branch icon, and the thread starts in it.</p>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/puck\">Puck</a> can do this too: ask it to start a thread on your runner in a new worktree and it passes a <code>worktree</code> name to <code>create_thread</code>.</p>\n<h2>Clean Up When You're Done</h2>\n<p>A thread that runs in a worktree the runner created gets a new action: <strong>Archive and Remove Worktree</strong>. It archives the thread, runs <code>git worktree remove</code>, and deletes the branch.</p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://static.ampcode.com/news/one-runner-many-worktrees-menu-dark.png\" alt=\"The thread actions menu on ampcode.com with a new entry, Archive and Remove Worktree, between Archive and Delete\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<h2>New Folders and Projects Too</h2>\n<p>The picker can also create things. Type the name of a directory that doesn't exist yet and you get <strong>New Directory</strong> or <strong>New Project</strong>. <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/cli/runners#create-a-directory-or-project\">Read more.</a></p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://static.ampcode.com/news/one-runner-many-worktrees-create-dark.png\" alt=\"The directory picker in the new thread composer with a name typed that doesn&#39;t exist yet, offering New Directory and New Project\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<h2>Oh, They Understand Secrets Now Too</h2>\n<p>Runners can also use the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/orbs/handling-secrets\">Secrets &amp; Env Vars</a> you configure on ampcode.com. Same variables that orbs get. It's off by default; opt in with <code>--amp-env</code>:</p>\n<pre><code class=\"language-shell-session\"><span class=\"code-snippet\" data-language=\"Shell-session\">$ amp --no-tui --runner-id mac-mini --discover-dirs --amp-env\n</span></code></pre>\n<p>Every time a thread starts, the runner fetches the variables that apply to it (personal, then project, then workspace) and adds them to the environment of the thread's shell commands, MCP servers, and plugins. Change a variable on ampcode.com and the next thread gets the new value. No restart, no SSH.</p>\n<p>Both need a runner on the current Amp version. If yours has been running for a while, it has <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/cli/runners#keep-a-runner-updated\">updated itself</a> already.</p>\n<p>Read more about <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/cli/runners#create-a-worktree\">worktrees</a> and <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/docs/cli/runners#secrets-env-vars\">Secrets &amp; Env Vars</a> in the runner docs.</p>\n",
  "content_markdown": "A [runner](https://ampcode.com/docs/cli/runners) can now create Git worktrees. Pick a repository the runner serves, hit Tab, name the branch, and the thread starts in a fresh checkout. Your main checkout stays untouched.\n\n![The new thread composer on ampcode.com with the runner mac-mini selected and the directory picker open. The amp repository is highlighted and offers Current or New Worktree.](https://static.ampcode.com/news/one-runner-many-worktrees-picker-dark.png)\n\nIn the directory picker, every Git checkout on the runner gets a **New Worktree** option next to it. Choose it and you get a small form:\n\n![The worktree form in the new thread composer: New worktree of amp, name fix-flaky-login-test, directory ~/code/amp-fix-flaky-login-test, branch fix-flaky-login-test, from current HEAD, and a Create Worktree button](https://static.ampcode.com/news/one-runner-many-worktrees-form-dark.png)\n\nThe name you chose becomes the branch name and the folder name. The runner then creates the worktree as a sibling of the repository: `~/code/amp` gets `~/code/amp-fix-flaky-login-test`, checked out on a new branch `fix-flaky-login-test` off the current `HEAD`. Uncommitted changes stay where they are, in the original checkout. The new directory shows up in the picker right away, marked with a branch icon, and the thread starts in it.\n\n[Puck](https://ampcode.com/docs/puck) can do this too: ask it to start a thread on your runner in a new worktree and it passes a `worktree` name to `create_thread`.\n\n## Clean Up When You're Done\n\nA thread that runs in a worktree the runner created gets a new action: **Archive and Remove Worktree**. It archives the thread, runs `git worktree remove`, and deletes the branch.\n\n![The thread actions menu on ampcode.com with a new entry, Archive and Remove Worktree, between Archive and Delete](https://static.ampcode.com/news/one-runner-many-worktrees-menu-dark.png)\n\n## New Folders and Projects Too\n\nThe picker can also create things. Type the name of a directory that doesn't exist yet and you get **New Directory** or **New Project**. [Read more.](https://ampcode.com/docs/cli/runners#create-a-directory-or-project)\n\n![The directory picker in the new thread composer with a name typed that doesn't exist yet, offering New Directory and New Project](https://static.ampcode.com/news/one-runner-many-worktrees-create-dark.png)\n\n## Oh, They Understand Secrets Now Too\n\nRunners can also use the [Secrets & Env Vars](https://ampcode.com/docs/orbs/handling-secrets) you configure on ampcode.com. Same variables that orbs get. It's off by default; opt in with `--amp-env`:\n\n```shell-session\n$ amp --no-tui --runner-id mac-mini --discover-dirs --amp-env\n```\n\nEvery time a thread starts, the runner fetches the variables that apply to it (personal, then project, then workspace) and adds them to the environment of the thread's shell commands, MCP servers, and plugins. Change a variable on ampcode.com and the next thread gets the new value. No restart, no SSH.\n\nBoth need a runner on the current Amp version. If yours has been running for a while, it has [updated itself](https://ampcode.com/docs/cli/runners#keep-a-runner-updated) already.\n\nRead more about [worktrees](https://ampcode.com/docs/cli/runners#create-a-worktree) and [Secrets & Env Vars](https://ampcode.com/docs/cli/runners#secrets-env-vars) in the runner docs.\n",
  "dateCreated": "2026-10-03T23:09:50.514863041+00:00",
  "date_created": "2026-09-22T00:00:00+00:00",
  "date_modified": "2026-09-22T00:00:00+00:00",
  "date_published": "2026-09-22T00:00:00+00:00",
  "description": "A runner can now create Git worktrees. Pick a repository the runner serves, hit Tab, name the branch, and the thread starts in a fresh checkout. Your main checkout stays untouched. In the directory picker, every Git checkout on the runner…",
  "external_url": "https://ampcode.com/news/one-runner-many-worktrees",
  "git": {
    "commit": "ebb0941c5c06a2ab2377342d607535262a3e969e",
    "path": "items/ampcode-com/2026/09/2026-09-22-one-runner-many-worktrees.md",
    "permalink": "https://github.com/aymericbeaumet/aggr-instance/blob/ebb0941c5c06a2ab2377342d607535262a3e969e/items/ampcode-com/2026/09/2026-09-22-one-runner-many-worktrees.md"
  },
  "id": "urn:aggr:item:1a8097ab868a8b27b2b8f174cca1795d0ea44d61",
  "isBasedOn": {
    "@id": "https://ampcode.com/news/one-runner-many-worktrees"
  },
  "mainEntity": {
    "@id": "https://ampcode.com/news/one-runner-many-worktrees",
    "@type": "CreativeWork",
    "archivedAt": {
      "@id": "https://aggr.aymericbeaumet.com/items/ampcode-com/2026-09-22-one-runner-many-worktrees/#webpage"
    },
    "dateModified": "2026-09-22T00:00:00+00:00",
    "datePublished": "2026-09-22T00:00:00+00:00",
    "headline": "One Runner, Many Worktrees",
    "timeRequired": "PT2M",
    "url": "https://ampcode.com/news/one-runner-many-worktrees",
    "wordCount": 355
  },
  "name": "Archived snapshot: One Runner, Many Worktrees",
  "preview": null,
  "reading_minutes": 2,
  "replicated_at": null,
  "source": "ampcode-com",
  "source_name": "Amp News",
  "summary": "A runner can now create Git worktrees. Pick a repository the runner serves, hit Tab, name the branch, and the thread starts in a fresh checkout. Your main checkout stays untouched. In the directory picker, every Git checkout on the runner gets a New Worktree option next to it. Choose it and you get a small form: The name you chose becomes the branch name and the folder name. The runner then creates the worktree as a sibling of the repository: ~/code/amp gets ~/code/amp-fix-flaky-login-test, checked out on a new branch fix-flaky-login-test off the current HEAD. Uncommitted changes stay where they are, in the original checkout. The new directory shows up in the picker right away, marked with a branch icon, and the thread starts in it. Puck can do this too: ask it to start a thread on your runner in a new worktree and it passes a worktree name to create_thread. Clean Up When You're Done A thread that runs in a worktree the runner created gets a new action: Archive and Remove Worktree. It archives the thread, runs git worktree remove, and deletes the branch. New Folders and Projects Too The picker can also create things. Type the name of a directory that doesn't exist yet and you get New Directory or New Project. Read more. Oh, They Understand Secrets Now Too Runners can also use the Secrets & Env Vars you configure on ampcode.com. Same variables that orbs get. It's off by default; opt in with --amp-env: $ amp --no-tui --runner-id mac-mini --discover-dirs --amp-env Every time a thread starts, the runner fetches the variables that apply to it (personal, then project, then workspace) and adds them to the environment of the thread's shell commands, MCP servers, and plugins. Change a variable on ampcode.com and the next thread gets the new value. No restart, no SSH. Both need a runner on the current Amp version. If yours has been running for a while, it has updated itself already. Read more about worktrees and Secrets & Env Vars in the runner docs.",
  "tags": [],
  "temporalCoverage": "2026-10-03T23:09:50.514863041+00:00",
  "title": "One Runner, Many Worktrees",
  "url": "https://aggr.aymericbeaumet.com/items/ampcode-com/2026-09-22-one-runner-many-worktrees/",
  "word_count": 355
}