fix: bug: entrypoint clones project at /home/agent/repos/${COMPOSE_PROJECT_NAME} but TOML parse later rewrites PROJECT_REPO_ROOT — dev-agent cd fails silently (#861)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
Agent 2026-04-16 11:42:48 +00:00
parent 342928bb32
commit 820ffafd0f
2 changed files with 23 additions and 1 deletions

View file

@ -254,7 +254,11 @@ agent_recover_session
# WORKTREE SETUP
# =============================================================================
status "setting up worktree"
cd "$REPO_ROOT"
if ! cd "$REPO_ROOT"; then
log "ERROR: REPO_ROOT=${REPO_ROOT} does not exist — cannot cd"
log "Check PROJECT_REPO_ROOT vs compose PROJECT_NAME vs TOML name mismatch"
exit 1
fi
# Determine forge remote by matching FORGE_URL host against git remotes
_forge_host=$(printf '%s' "$FORGE_URL" | sed 's|https\?://||; s|/.*||')