Don't hand-roll retries. Use the shared helper, retry.Do in lib/retry.
Switched 3 call sites to retry.Do with the team backoff. Tests pass.
You work as usual. Nothing to tag or write up.
use-retry-helper
When code retries a network call, use retry.Do from lib/retry with the team backoff. Never write a retry loop by hand.
- Learned from
- your Claude Code session
- Shared
- after your OK
A skill is a short, plain rule your agents follow. You approve it before anyone gets it.
- for i := 0; i < 3; i++ { - if err = fetch(ctx); err == nil { - break - } - } + err = retry.Do(ctx, fetch)
Also followed in Codex and Claude Code
Their agent follows the skill on its own. No prompt to write.