diff --git a/scripts/ops/antigravity-cli/run_205_followup_via_agy.sh b/scripts/ops/antigravity-cli/run_205_followup_via_agy.sh index caeddf3..cc58441 100755 --- a/scripts/ops/antigravity-cli/run_205_followup_via_agy.sh +++ b/scripts/ops/antigravity-cli/run_205_followup_via_agy.sh @@ -9,6 +9,7 @@ REPO_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)" TEMPLATE_FILE="$SCRIPT_DIR/205_followup_prompt.template.txt" PARSER_SCRIPT="$SCRIPT_DIR/parse_205_runner_output.py" MODEL="gemini-3.6-flash-high" +MODE="${AGY_MODE:-plan}" if command -v agy-ultra &>/dev/null; then EXEC_BIN="agy-ultra" @@ -44,14 +45,18 @@ else fi set +e -RAW_OUTPUT="$("$EXEC_BIN" -p "$PROMPT" --model "$MODEL" --add-dir "$REPO_DIR" 2>&1)" +RAW_OUTPUT="$( + "$EXEC_BIN" -p "$PROMPT" \ + --model "$MODEL" \ + --mode "$MODE" \ + --add-dir "$REPO_DIR" 2>&1 +)" AGY_EXIT=$? set -e -if [ $AGY_EXIT -ne 0 ]; then - echo "ERROR: agy CLI binary failed with exit code $AGY_EXIT" >&2 +if [[ $AGY_EXIT -ne 0 ]]; then printf '%s\n' "$RAW_OUTPUT" >&2 - exit $AGY_EXIT + exit "$AGY_EXIT" fi if [[ -z "${RAW_OUTPUT//[[:space:]]/}" ]]; then