@kivlor/pi-ask-user
ask_user tool for pi — ask the user one focused question and wait, TUI and RPC (Paseo) safe
Package details
Install @kivlor/pi-ask-user from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@kivlor/pi-ask-user- Package
@kivlor/pi-ask-user- Version
0.1.2- Published
- Oct 7, 2026
- Downloads
- 487/mo · 16/wk
- Author
- kivlor
- License
- MIT
- Types
- extension
- Size
- 8.1 KB
- Dependencies
- 0 dependencies · 2 peers
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
@kivlor/pi-ask-user
ask_user tool for the Pi coding agent: ask the user one focused question
and wait for the answer.
Install
pi install npm:@kivlor/pi-ask-user
--local/-l writes the declaration to the project's .pi/settings.json
instead of the personal one. Manage installed extensions with pi config.
What it does
Registers an ask_user tool the model can call when a decision genuinely
needs the user's input:
- With
options: shows a selection dialog (ctx.ui.select). - Without
options: shows a free-form input dialog (ctx.ui.input). - With
allowOther(default true when options are given): appends anOther…choice that falls through to a free-form input. - Returns the answer to the model as ordinary tool output. Cancellation
(Esc, or a
cancelledRPC response) returns a concise "user did not answer" result instead of throwing.
The tool description and system-prompt guidelines steer the model toward asking one decision at a time, preferring concrete options, and not asking about things it can determine itself.
RPC / Paseo safe
Only the standard extension dialogs are used, which work in the TUI and are
forwarded through the RPC extension UI protocol. Nothing is gated on
ctx.mode === "tui" and ctx.ui.custom() is never called, so the tool
works from Paseo and other RPC clients. In json/print modes (no
dialog-capable UI) the tool returns immediately instead of blocking.
Project-local alternative
The whole implementation is one file. To use it in a single project without
installing the package, copy src/index.ts to <project>/.pi/extensions/ask-user.ts.
No state, no I/O, no subprocesses, no dependencies beyond pi's own packages.