From c7168b58e58ea803870dffefd9c9ed8c9cc70c45 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Apr 2026 12:26:31 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20bug:=20architect-run.sh=20exits=20silent?= =?UTF-8?q?ly=20=E2=80=94=20runs=20git=20from=20baked=20/home/agent/disint?= =?UTF-8?q?o=20which=20is=20not=20a=20git=20repo=20(#569)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- architect/architect-run.sh | 3 +++ gardener/gardener-run.sh | 9 ++++++--- planner/planner-run.sh | 3 +++ predictor/predictor-run.sh | 3 +++ supervisor/supervisor-run.sh | 3 ++- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/architect/architect-run.sh b/architect/architect-run.sh index b2ddf3c..4812664 100755 --- a/architect/architect-run.sh +++ b/architect/architect-run.sh @@ -78,6 +78,9 @@ memory_guard 2000 log "--- Architect run start ---" # ── Resolve forge remote for git operations ───────────────────────────── +# Run git operations from the project checkout, not the baked code dir +cd "$PROJECT_REPO_ROOT" + resolve_forge_remote # ── Resolve agent identity for .profile repo ──────────────────────────── diff --git a/gardener/gardener-run.sh b/gardener/gardener-run.sh index b1c1cf1..9a7ad90 100755 --- a/gardener/gardener-run.sh +++ b/gardener/gardener-run.sh @@ -67,6 +67,12 @@ memory_guard 2000 log "--- Gardener run start ---" +# ── Resolve forge remote for git operations ───────────────────────────── +# Run git operations from the project checkout, not the baked code dir +cd "$PROJECT_REPO_ROOT" + +resolve_forge_remote + # ── Precondition checks: skip if nothing to do ──────────────────────────── # Check for new commits since last run CURRENT_SHA=$(git -C "$FACTORY_ROOT" rev-parse HEAD 2>/dev/null || echo "") @@ -85,9 +91,6 @@ fi log "current sha: ${CURRENT_SHA:0:8}..., backlog issues: ${backlog_count}, tech-debt issues: ${tech_debt_count}" -# ── Resolve forge remote for git operations ───────────────────────────── -resolve_forge_remote - # ── Resolve agent identity for .profile repo ──────────────────────────── resolve_agent_identity || true diff --git a/planner/planner-run.sh b/planner/planner-run.sh index 0845dc0..227dd94 100755 --- a/planner/planner-run.sh +++ b/planner/planner-run.sh @@ -89,6 +89,9 @@ fi log "sha=${CURRENT_SHA:0:8} ops=${CURRENT_OPS_SHA:0:8} unreviewed=${unreviewed_count} vision=${vision_open}" # ── Resolve forge remote for git operations ───────────────────────────── +# Run git operations from the project checkout, not the baked code dir +cd "$PROJECT_REPO_ROOT" + resolve_forge_remote # ── Resolve agent identity for .profile repo ──────────────────────────── diff --git a/predictor/predictor-run.sh b/predictor/predictor-run.sh index 0538288..8400418 100755 --- a/predictor/predictor-run.sh +++ b/predictor/predictor-run.sh @@ -63,6 +63,9 @@ memory_guard 2000 log "--- Predictor run start ---" # ── Resolve forge remote for git operations ───────────────────────────── +# Run git operations from the project checkout, not the baked code dir +cd "$PROJECT_REPO_ROOT" + resolve_forge_remote # ── Resolve agent identity for .profile repo ──────────────────────────── diff --git a/supervisor/supervisor-run.sh b/supervisor/supervisor-run.sh index 54a0f0f..b27293c 100755 --- a/supervisor/supervisor-run.sh +++ b/supervisor/supervisor-run.sh @@ -85,7 +85,8 @@ memory_guard 2000 log "--- Supervisor run start ---" # ── Resolve forge remote for git operations ───────────────────────────── -resolve_forge_remote +# Run git operations from the project checkout, not the baked code dir +cd "$PROJECT_REPO_ROOT" # ── Housekeeping: clean up stale crashed worktrees (>24h) ──────────────── cleanup_stale_crashed_worktrees 24