Next prompt
Next prompt offers a likely follow-up after a completed run. It is deliberately selective: a finished task, an unresolved question or several equally plausible directions should produce no suggestion. Accepting text never sends it automatically.
Enable and requirements
Section titled “Enable and requirements”Use Install & select and select packages/pi-next-prompt/src/index.ts. The suite loads all 19 entries by default and uses one Git pin for every selected component. This extension requires Pi 1.0 or newer; use the installation guide’s tested version for the suite as a whole.
Suggestions need an interactive editor. Print mode and ordinary headless subagents receive no suggestion instruction. No companion extension is required, and Jev is optional rather than a prerequisite for showing text.
The main model receives an additional prompt section of roughly 150 tokens and may emit roughly 20 extra output tokens for a suggestion. There is no separate generative request. Optional Jev validation is a paid external classifier call, however, so “no extra generation” does not mean “no extra model cost.”
Accept, edit or ignore
Section titled “Accept, edit or ignore”A suggestion appears as dim text in an empty editor after a completed run. Press Tab or Right to copy it into the editor, then review, edit and send it normally. For example, a suggestion to run a specific test should remain an editable proposal, not permission to execute that test without your next message.
Typing hides the suggestion. Deleting everything you typed brings it back until a prompt is sent. A new run, compaction or session switch clears it. Failed and aborted runs do not show suggestions. Tab and Right are intercepted only while a suggestion is visible and the editor is empty; otherwise the editor handles them normally.
The extension wraps rendering rather than replacing the editor. Editors drawing Pi’s software or hardware cursor, including pi-vim, can show inline ghost text. If no compatible cursor is drawn, the fallback is a dim line below the editor with an acceptance hint.
Commands and configuration
Section titled “Commands and configuration”/next-promptor/next-prompt statusreports enabled state and the last suggestion’s verdict./next-prompt onenables suggestions for the session, subject to settings./next-prompt offclears the suggestion and stops adding the instruction for subsequent runs.
Files merge in order: ~/.config/agents/next-prompt.json, ~/.pi/agent/next-prompt.json, <project>/.agents/next-prompt.json, then <project>/.pi/next-prompt.json. Shared user settings honor $XDG_CONFIG_HOME. Objects merge, while arrays and scalar values replace earlier values.
This project .pi/next-prompt.json keeps the default acceptance keys and length while disabling classifier validation:
{ "enabled": true, "acceptKeys": ["tab", "right"], "maxChars": 110, "jev": { "enabled": false }}Acceptance keys use pi-tui key identifiers, such as tab, right or ctrl+f. When enabled, Jev defaults to provider typesafe, model jev-latest, timeout 1,500 ms and acceptance threshold 0.6. Pi supplies credentials, normally TYPESAFE_API_KEY for TypeSafe.
Data sent and fallback behavior
Section titled “Data sent and fallback behavior”The main model writes a final <next>...</next> line under the added instruction. The extension strips recognized tag lines at message_end before storing the assistant response, keeping them out of the saved answer and later conversation context. The tag may briefly be visible during streaming. Once you accept and send a suggestion, it is naturally an ordinary user message.
For a candidate suggestion, Jev receives the suggestion itself, up to 1,500 characters of the latest user prompt and up to 2,000 characters from the end of the assistant answer. Those excerpts may contain private project details. The classifier checks whether the proposal is concrete, relevant and not already completed; this is not a safety or authorization check.
A probability below 0.6 hides the proposal by default. Disabled Jev, missing credentials, timeouts or missing answers show the proposal anyway. There is no classifier request when the main model supplies no candidate. /next-prompt status helps distinguish a rejected candidate from one shown without validation.
Limitations and related documentation
Section titled “Limitations and related documentation”A suggestion is model-authored and can still be wrong or redundant, even after validation. It cannot know which of several unstated priorities you prefer. Do not expect a suggestion after every turn, and review accepted commands or requests before sending them.
For editor or key conflicts, consult Troubleshooting. The source and tests cover tag processing, editor behavior, lifecycle clearing and classifier fallback.