@narumitw/pi-retry
v0.1.26
Published
Public pi extension that retries empty-detail provider unknown errors.
Maintainers
Readme
🔁 pi-retry — Retry Hints for Pi Provider Errors
@narumitw/pi-retry is a native Pi coding agent extension that treats provider responses containing Unknown error (no error details in response) as retryable.
Use it to make Pi sessions more resilient when an upstream AI provider returns a transient unknown error without useful details.
✨ Features
- Detects assistant messages that end with
stopReason: "error". - Matches the known provider error text
Unknown error (no error details in response). - Appends Pi's retryable-provider-error hint.
- Lets Pi's built-in retry path continue the turn.
- Shows a short-lived statusline item only when a matching error triggers retry.
- Requires no commands or configuration.
- Works as a small, focused npm Pi extension package.
📦 Install
pi install npm:@narumitw/pi-retryTry without installing permanently:
pi -e npm:@narumitw/pi-retryTry this package locally from the repository root:
pi -e ./extensions/pi-retry🚀 What it does
When an assistant message ends with stopReason: "error" and the error message matches Unknown error (no error details in response), the extension appends Pi's retryable-provider-error hint so Pi's built-in retry path can continue the turn.
The extension does not keep a permanent statusline entry. It briefly shows 🔁 retrying only when it has matched the error and asked Pi to retry.
🧠 Use cases
- Reduce manual restarts after transient provider failures.
- Improve reliability during long Pi coding agent sessions.
- Keep tool-heavy implementation tasks moving when a provider returns an unknown error.
- Pair with
@narumitw/pi-goalfor more robust autonomous task loops.
🗂️ Package layout
extensions/pi-retry/
├── src/
│ └── unknown-error-retry.ts
├── README.md
├── LICENSE
├── tsconfig.json
└── package.jsonThe package exposes its Pi extension through package.json:
{
"pi": {
"extensions": ["./src/unknown-error-retry.ts"]
}
}🔎 Keywords
Pi extension, Pi coding agent, retry, provider error, unknown error, AI provider reliability, agent resilience, TypeScript Pi package, npm Pi extension.
📄 License
MIT. See LICENSE.
