[FEATURE] Allow faster retry when network connectivity is restored during backoff

Resolved 💬 3 comments Opened Apr 10, 2026 by samdunietz Closed May 23, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When Claude Code encounters a network or API failure, it retries with exponential backoff (up to 10 retries). This is reasonable during an outage, but frustrating when connectivity is restored before the next retry fires. For example, if you lose internet for 30 seconds and it comes back, you may still have to wait 30+ seconds for the next retry because the backoff interval has grown. There's no way to say "I'm back online, try now."

Proposed Solution

Detect restored connectivity during backoff and retry immediately. The simplest cross-platform approach: during the backoff wait, periodically (e.g., every 2-3s) run a dns.resolve('api.anthropic.com'). If it succeeds, trigger the retry immediately instead of waiting for the full interval.

Alternatively or additionally, a keyboard shortcut to manually trigger an immediate retry during backoff would be useful and simple to implement.

Alternative Solutions

  • OS-level network change events (macOS NWPathMonitor, Linux netlink sockets) could provide instant detection without polling, but require platform-specific code.
  • A shorter cap on the max backoff interval would reduce the worst case but wouldn't eliminate the wait.
  • Currently the only workaround is to wait or restart the session.

Priority

Low - Nice to have

Feature Category

Performance and speed

Use Case Example

  1. You're in the middle of a Claude Code session
  2. Your Wi-Fi drops for 20 seconds
  3. Claude Code hits a network error and starts backing off
  4. Wi-Fi reconnects
  5. You're staring at a "retrying in 45s..." countdown with no way to skip it

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗