cmdWebsearch called fetch() with no timeout and no retry, so a hung connection blocked indefinitely and transient 429/5xx/network failures were not recovered. Add AbortSignal.timeout (configurable via GSD_WEBSEARCH_TIMEOUT_MS, default 10s) and a bounded retry loop (max 2 retries, exponential backoff + jitter) for 429/5xx/network errors, honoring Retry-After on 429 (capped at 60s). Non-429 4xx fail immediately (no wasted retries). Transient-exhausted failures report an `attempts` count. Worst-case time is bounded by timeout*(1+retries)+backoff. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
82 KiB
82 KiB