With set -Eeuo pipefail, a failing fvm flutter test exited the script before _e2e_exit=$? could run, so the retry-on-new-display logic never fired. Use the cmd || var=$? pattern to capture the exit code safely, and add || true to the break guard so set -e doesn't trip on it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>