diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index 325f69286..aadb740d5 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -475,8 +475,8 @@ export async function startAuto( // Capture the integration branch — records the branch the user was on when // auto-mode started. Slice branches will merge back to this branch instead - // of the repo's default (main/master). Idempotent: only writes if not - // already recorded, so restarts/resumes don't overwrite. + // of the repo's default (main/master). Idempotent when the branch is the + // same; updates the record when started from a different branch (#300). if (currentMilestoneId) { captureIntegrationBranch(base, currentMilestoneId); setActiveMilestoneId(base, currentMilestoneId); diff --git a/src/resources/extensions/gsd/worktree.ts b/src/resources/extensions/gsd/worktree.ts index ecbfdfffe..4a2c84516 100644 --- a/src/resources/extensions/gsd/worktree.ts +++ b/src/resources/extensions/gsd/worktree.ts @@ -55,7 +55,9 @@ export function setActiveMilestoneId(basePath: string, milestoneId: string | nul /** * Record the current branch as the integration branch for a milestone. * Called once when auto-mode starts — captures where slice branches should - * merge back to. No-op if already recorded or if on a GSD slice branch. + * merge back to. No-op if the same branch is already recorded. Updates the + * record when the user starts from a different branch (#300). Always a no-op + * if on a GSD slice branch. */ export function captureIntegrationBranch(basePath: string, milestoneId: string): void { const svc = getService(basePath);