The best way to control Claude Code, Codex and more from any computer or phone
fix(ci): retry Cursor webhook HTTP 400s on main (#19077)
Yash Singh committed
Oct 13, 2026 at 10:07 UTC
42160f2925daa3c0d4ef2b95f68a87858972e6a3
1 file changed
+20
-6
.github/workflows/cursor-hygiene-webhook.yml
+20
-6
@@ -28,9 +28,23 @@ jobs:
28
echo "Missing CURSOR_T3CODE_WEBHOOK_URL or CURSOR_T3CODE_WEBHOOK_AUTH — skipping."
29
exit 0
30
fi
31
- curl -fsS --max-time 60 -X POST "$URL" \
32
- -H "Authorization: $AUTH" \
33
- -H "Content-Type: application/json" \
34
- -H "X-GitHub-Event: ${{ github.event_name }}" \
35
- -H "X-GitHub-Delivery: ${{ github.run_id }}-${{ github.run_attempt }}" \
36
- --data-binary @"${{ github.event_path }}"
31
+ for attempt in 1 2 3; do
32
+ curl_status=0
33
+ http_status=$(curl -fsS --max-time 60 -X POST "$URL" \
34
+ --output /dev/null --write-out '%{http_code}' \
35
+ -H "Authorization: $AUTH" \
36
+ -H "Content-Type: application/json" \
37
+ -H "X-GitHub-Event: ${{ github.event_name }}" \
38
+ -H "X-GitHub-Delivery: ${{ github.run_id }}-${{ github.run_attempt }}" \
39
+ --data-binary @"${{ github.event_path }}") || curl_status=$?
40
+ if [ "$curl_status" -eq 0 ]; then
41
+ exit 0
42
+ fi
43
+ if [ "$GITHUB_REF" != "refs/heads/main" ] || \
44
+ [ "$curl_status" -ne 22 ] || [ "$http_status" != "400" ] || \
45
+ [ "$attempt" -eq 3 ]; then
46
+ exit "$curl_status"
47
+ fi
48
+ echo "Cursor webhook returned HTTP 400; retrying in 5 seconds ($attempt/2)."
49
+ sleep 5
50
+ done