When sync.branch is configured, the sync command: 1. Exports changes to JSONL 2. Commits to sync branch via worktree 3. Pulls from sync branch 4. Restores .beads/ from HEAD to keep working directory clean But PersistentPostRun's flushManager.Shutdown() was re-exporting to JSONL, undoing the restore and leaving modified files. Fix: Set skipFinalFlush flag when sync.branch mode completes successfully. This prevents the final export in PersistentPostRun. Also: Skip push to main branch when sync.branch is configured - all pushes should go through the sync branch worktree.
58 KiB
58 KiB