From 9fbfd8f4ebd85c53ce5a0b52715dff679e2cf80f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 20 Nov 2025 17:17:38 -0500 Subject: fix: handle existing task branches in worker guide - Workers should reuse existing branches if they crashed/restarted - Changed 'git checkout -b' to 'git checkout || git checkout -b' --- Omni/Agent/WORKER_AGENT_GUIDE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Omni/Agent/WORKER_AGENT_GUIDE.md') diff --git a/Omni/Agent/WORKER_AGENT_GUIDE.md b/Omni/Agent/WORKER_AGENT_GUIDE.md index ff33259..5797d85 100644 --- a/Omni/Agent/WORKER_AGENT_GUIDE.md +++ b/Omni/Agent/WORKER_AGENT_GUIDE.md @@ -56,9 +56,10 @@ task update t-123 in-progress * If you find an unmerged dependency branch, check it out: `git checkout task/t-parent-id`. * Otherwise, start from fresh live code: `git checkout omni-worker-1` (which tracks `live`). -4. **Create Feature Branch**: +4. **Create/Checkout Feature Branch**: ```bash - git checkout -b task/t-123 + # Try to switch to existing branch, otherwise create new one + git checkout task/t-123 || git checkout -b task/t-123 ``` ### Step 4: Implement -- cgit v1.2.3 From bcc416959deeb4bcd5ce12d00807b7e673a6d0dd Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 20 Nov 2025 17:50:27 -0500 Subject: fix: prevent data loss in worker loop - Changed 'git reset --hard' to 'git merge' in worker guide - This prevents the worker from wiping its own status updates (commits to base branch) when starting a new task loop --- Omni/Agent/WORKER_AGENT_GUIDE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Omni/Agent/WORKER_AGENT_GUIDE.md') diff --git a/Omni/Agent/WORKER_AGENT_GUIDE.md b/Omni/Agent/WORKER_AGENT_GUIDE.md index 5797d85..5d39ab5 100644 --- a/Omni/Agent/WORKER_AGENT_GUIDE.md +++ b/Omni/Agent/WORKER_AGENT_GUIDE.md @@ -22,10 +22,10 @@ The Worker Agent should run the following loop continuously: # Go to worker directory cd ../omni-worker-1 -# Reset base branch to latest live code -# This ensures we build on top of the latest merged work +# Update base branch with latest live code +# We use merge to preserve any local status updates we haven't harvested yet git fetch origin live -git reset --hard origin/live +git merge origin/live --no-edit # Sync tasks from the live branch ./Omni/Agent/sync-tasks.sh -- cgit v1.2.3 From d2c6915f9715d079f021660c22cc1fd39ed16bcd Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 20 Nov 2025 17:53:12 -0500 Subject: fix: merge local live branch in worker guide - We share the .git directory, so we can merge 'live' directly - Avoids dependency on 'origin' which might be stale or unused --- Omni/Agent/WORKER_AGENT_GUIDE.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Omni/Agent/WORKER_AGENT_GUIDE.md') diff --git a/Omni/Agent/WORKER_AGENT_GUIDE.md b/Omni/Agent/WORKER_AGENT_GUIDE.md index 5d39ab5..782d4d5 100644 --- a/Omni/Agent/WORKER_AGENT_GUIDE.md +++ b/Omni/Agent/WORKER_AGENT_GUIDE.md @@ -23,9 +23,8 @@ The Worker Agent should run the following loop continuously: cd ../omni-worker-1 # Update base branch with latest live code -# We use merge to preserve any local status updates we haven't harvested yet -git fetch origin live -git merge origin/live --no-edit +# We merge the local 'live' branch directly since we share the git dir +git merge live --no-edit # Sync tasks from the live branch ./Omni/Agent/sync-tasks.sh -- cgit v1.2.3