Install
Install with PiG
pig install npm:@esso0428/pi-retry-commandInstall with Pi
pi install npm:@esso0428/pi-retry-commandPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.2.1 (README.md). PiG does not review it.
@esso0428/pi-retry-command
A Pi extension providing /retry and /continue commands.
How it works
/retry uses Session Tree navigation to retry the last prompt:
- Finds the last user message in the session tree
- Navigates back to its parent entry using
ctx.navigateTree() - Resubmits the original prompt via
pi.sendUserMessage()
This creates a true session branch — the failed response is preserved and you can always go back to it via /tree.
/continue stays on the current session branch and continues agent execution without replaying a user prompt. It keeps the prior conversation and triggers an additional agent turn. The command leaves only a hidden journal custom message; the context hook removes that message before the LLM sees it.
Original:
User A → Assistant A → User B → Assistant B (failed)
After /retry:
User A → Assistant A
├── User B → Assistant B (failed, preserved)
└── User B' → Assistant B' (new attempt)
Installation
pi install npm:@esso0428/pi-retry-command
Usage
Type /retry in Pi when:
- The last response was aborted (ESC) or errored
- You want to retry with the exact same prompt (including images/multimodal content)
- You want to preserve the failed branch for reference
Type /continue when you want another agent turn on the current branch without sending a new prompt:
/retry # retry the last user prompt on a new branch
/continue # continue the current branch with the existing conversation
Requirements
- Pi Coding Agent with Session Tree support
License
MIT