mirror of
https://github.com/0xWheatyz/handler.git
synced 2026-08-30 12:06:24 +00:00
f03b03ab5c
Agents spawned by handler were getting branches several commits behind main. Two compounding causes: sync_project ran 'git pull --ff-only' in the project root, which only moves whichever branch the root checkout happens to be on — an agent parked on a feature branch left origin/* stale (and the pull's 'no tracking information' failure degraded to an easy-to-miss sync_note). Then worktree spawns cut new branches from the root's HEAD, inheriting that stale state. sync_project now fetches origin (refreshing origin/* regardless of the checkout), re-pins origin/HEAD, and fast-forwards the checkout only when it sits on the default branch — a diverged default branch still fails loudly. New worktree branches are cut from origin/HEAD with --no-track so they start at the remote default branch's tip and don't adopt it as upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7mF6qeryi9nJthaxYkfPm