diff --git a/executable_yolo b/executable_yolo index 9631e4d..f88569e 100755 --- a/executable_yolo +++ b/executable_yolo @@ -1073,6 +1073,12 @@ run_multi_agents() { cmd_arr+=(--add-dir "$YOLO_WORKTREE_PATH") fi + # If auggie, add --workspace-root to use the worktree directory + if [[ "$agent" == "auggie" ]]; then + # Set workspace root to the current worktree path + cmd_arr+=("--workspace-root" "$YOLO_WORKTREE_PATH") + fi + # Return to the original directory to continue creating more worktrees cd "$start_pwd" @@ -1702,6 +1708,11 @@ main() { full_command+=("${flag_array[@]}") fi + # If running in worktree mode, set workspace root to worktree path + if [[ "$use_worktree" == "true" && -n "$YOLO_WORKTREE_PATH" ]]; then + full_command+=("--workspace-root" "$YOLO_WORKTREE_PATH") + fi + # If prompt provided, use --print mode for automation if (( ${#command_args[@]} )); then local prompt_joined