From 1fb0cbb804ba5d5bd598fac6ab11be7cedd9cb91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:33:55 +0000 Subject: [PATCH 1/2] Initial plan From 4749fd5d12d7410d96b40aeba3d84df1b0a85afc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:42:41 +0000 Subject: [PATCH 2/2] Fix evergreen agent instructions to create local tracking branch before push The push_to_pull_request_branch tool requires a named local branch to create patches from. When the agent checks out the PR branch with a detached HEAD, the tool fails with "Branch does not exist locally". Updated step 2 of the agent instructions to explicitly use `git checkout -b` to create a local tracking branch. Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/d2700d0e-7bbb-4650-aa27-84a4b45b7c29 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com> --- .github/workflows/evergreen.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/evergreen.md b/.github/workflows/evergreen.md index 3fe2bdfb..481eae1c 100644 --- a/.github/workflows/evergreen.md +++ b/.github/workflows/evergreen.md @@ -279,7 +279,11 @@ A pre-flight step has already identified a PR that needs attention. Read the sel - `selected.base_branch` — the target branch (usually `main`) - `selected.attempts` — how many times we've already tried on this SHA -2. **Check out the PR branch** and investigate the issues. +2. **Check out the PR branch** as a local tracking branch so the push tool can find it: + ```bash + git checkout -b origin/ + ``` + where `` is `selected.head_branch` from the selection file. **Do not** use a detached HEAD checkout — the `push-to-pull-request-branch` tool requires a named local branch. 3. **Fix the issues**: