@indexyz/pi-continue
Resume interrupted or failed pi agent work with the currently selected model
Package details
Install @indexyz/pi-continue from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@indexyz/pi-continue- Package
@indexyz/pi-continue- Version
0.1.44- Published
- Nov 4, 2026
- Downloads
- 829/mo · 80/wk
- Author
- indexyz
- License
- MIT
- Types
- extension
- Size
- 11.3 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
@indexyz/pi-continue
A pi extension that adds /continue for resuming the most recently interrupted or failed turn with the currently selected model.
Install
pi install npm:@indexyz/pi-continue
Releases are published to npm as @indexyz/pi-continue; each release is tagged @indexyz/pi-continue@<version>.
To try a repository checkout (after npm install at the repository root):
pi -e ./pi-continue/index.ts
Usage
- Interrupt a running turn (for example, with Escape), or let a provider request fail.
- Optionally select another model with
/model. - Run
/continue.
/continue
/continue takes no arguments. In particular, no --model provider/model option is needed: pi retries the turn using whichever model is selected when the command executes. It does not append a synthetic user prompt.
The command waits for the run to settle, verifies that the current branch ends in an aborted or failed assistant turn, and directly retries from the preceding user message or tool result. A hidden control message starts the turn but is removed, together with the failed assistant response, from every model context. This is a request-level retry rather than a token-level continuation of partial assistant output. Model and thinking-level changes recorded after the interruption or failure do not hide that turn. This includes provider errors such as HTTP 429 rate limits. If no model is selected, /continue reports an error and starts no turn.
中断或遇到 provider 错误后,可以先用 /model 切换模型,再运行 /continue;失败的 assistant 响应会从模型上下文中移除,并由当前选中的模型直接重试,不会新增 user prompt。这是重新执行失败请求,不是从 assistant 的半截输出继续生成 token。
Development
Verified against Pi 1.5.0.
npm install
npm run check --workspace @indexyz/pi-continue
License
MIT