fix: fix: agents container should clone project repo on first startup; treat init's host clone as operator-side only (#605)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

This commit is contained in:
Claude 2026-04-10 17:19:33 +00:00
parent 10be72f5ce
commit c3074e83fc
3 changed files with 37 additions and 0 deletions

View file

@ -664,6 +664,10 @@ p.write_text(text)
preflight_check "$forge_repo" "$forge_url"
# Determine repo root (for new projects)
# This host-side clone is operator-only convenience (#589): it enables
# `cd ~/project && $EDITOR .` but is NOT read by agents at runtime.
# Agents clone independently from FORGE_URL/FORGE_REPO into the
# project-repos named volume at /home/agent/repos/${project_name}.
repo_root="${repo_root:-/home/${USER}/${project_name}}"
# Clone or validate (try origin first for initial clone from upstream)