After milestone completion and merge, the process cwd could remain inside .gsd/worktrees/<MID>/, causing new milestone writes to land in the wrong directory. Three-layer fix: 1. escapeStaleWorktree() at startAuto entry — detects if base path is inside .gsd/worktrees/ and chdir back to project root 2. stopAuto() unconditionally restores cwd to originalBasePath, not just when isInAutoWorktree returns true (module state may have been cleared by mergeMilestoneToMain already) 3. Milestone merge error handler restores cwd on partial failure where mergeMilestoneToMain chdir'd but then threw Closes #608 |
||
|---|---|---|
| .. | ||
| agents | ||
| extensions | ||
| skills | ||
| GSD-WORKFLOW.md | ||