@furkanbilgin/pi-retry

Auto-retry Pi extension — automatically recovers from transient provider errors (400, 5xx, rate limits, connection failures) mid-conversation by sending a continuation prompt with exponential backoff

Packages

Package details

extension

Install @furkanbilgin/pi-retry from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@furkanbilgin/pi-retry
Package
@furkanbilgin/pi-retry
Version
0.1.2
Published
Jun 13, 2026
Downloads
471/mo · 236/wk
Author
furkanbilgin
License
MIT
Types
extension
Size
12.7 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@furkanbilgin/pi-retry

Auto-retry Pi extension. Automatically recovers when provider errors occur mid-conversation (e.g. Error: 400 Error from provider (Xiaomi): Request Error). Sends "Go on" with exponential backoff instead of forcing you to notice the error and re-prompt.

The Why

Xiaomi MiMo frequently gives me 400 errors out of the blue. (Maybe OpenCode Go's fault, but I wouldn't blame them. I LOVE them.)

I used to just write "Go on" or "Continue" by hand but it got boring after a while.

Install

pi install npm:@furkanbilgin/pi-retry
/reload

How it works

When the agent hits a transient provider error, the extension sends "Go on" as a follow-up message (2s, 4s, 8s backoff, up to 3 attempts). It re-sends the original prompt only on manual /retry — re-sending old prompts mid-conversation rarely makes sense.

Configuration

Edit retryPrompt or maxRetries etc. in lib.tsDEFAULT_CONFIG, then run /reload.

Only matches errors Pi doesn't retry natively: Error from provider, Provider Error, Request Error, and 4xx errors (excluding 429 which Pi handles).

Commands

Command Description
/retry Re-send the last user message (sends the original prompt, not "Go on")

Requirements

  • Pi v0.79+
  • No additional npm dependencies

License

MIT