fix: Windows worktree creation falls back gracefully instead of using temp dirs#440
fix: Windows worktree creation falls back gracefully instead of using temp dirs#440
Conversation
…tly using temp dirs
- Set core.longpaths on new worktrees for Windows (RepoManager)
- Handle GroupShared strategy explicitly with -shared- branch naming
- Fall back to existing worktree when creation fails instead of temp dir
- Add 4 regression tests for worktree failure fallback scenarios
Fixes: sessions in Implement & Challenge groups on Windows end up with
WorkingDirectory pointing to %TEMP%\polypilot-sessions\{guid} instead
of proper git worktrees.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
931d56b to
68aa1e9
Compare
PR #440 Review — R1Tests: ✅ 2970/2970 passed The core approach is correct — 🔴 Major:
|
🔄 Re-Review Round 2No new commits since R1 (still 1 commit, last updated 2026-03-26). The R1 findings remain open. R1 Findings Status
|
Problem
On Windows, "Implement & Challenge" multi-agent groups end up with sessions pointing to temp directories instead of proper git worktrees. This works fine on Mac.
Root Cause
CreateGroupFromPresetAsync has try/catch blocks around worktree creation that silently swallow exceptions (only Debug log). When worktree creation fails on Windows (long paths, file locking), orchWorkDir stays null, CreateSessionAsync gets null workingDirectory, and creates a temp dir.
Additionally, GroupShared strategy was falling into the wrong code path, creating -orchestrator- branches instead of -shared- branches.
Fix
Testing