From 50aea7e6f1786193e33b508acd412dc10b8ee835 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Thu, 5 Mar 2026 20:49:21 +0100 Subject: [PATCH] fix: Ensure phase branches exist before task dispatch Task dispatch computed baseBranch as the phase branch name but never ensured it existed in the git clone. When phases weren't dispatched through the PhaseDispatchManager (which creates branches), the git worktree add failed with "fatal: invalid reference". Now DefaultDispatchManager calls ensureBranch for both the initiative and phase branches before spawning, matching what PhaseDispatchManager already does. --- apps/server/container.ts | 3 +++ apps/server/dispatch/manager.ts | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/apps/server/container.ts b/apps/server/container.ts index e72a7a3..a009504 100644 --- a/apps/server/container.ts +++ b/apps/server/container.ts @@ -212,6 +212,9 @@ export async function createContainer(options?: ContainerOptions): Promise