Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0077: Add an interactive multi-question asktool
- Status: Accepted for implementation (amended 2026-09-27: question and option text render as Markdown for display only)
- Date: 2026-08-12
- Related: E2E-123
Context
The model needs a structured way to collect several user decisions without drafting chat prose or permission requests. The user may answer one question at a time, select multiple options, add custom text, skip, or decline the prompt, and an unanswered call still needs a stable tool output.
Decision
- A built-in
asktool, available in every operating mode, emits a typedasktool_requestevent and pauses the runtime until the renderer resolves it throughpi-desktop/agent/askTool/resolve. - The request carries ordered question text, option labels, and an optional multi-select flag; the renderer adds a custom text-input option and shows one question at a time.
- Skip and decline resolve to
null, answers carry selected labels and custom text, and there is no timeout. - Resolved values become tool content:
question:answerper line,\n---\nbetween questions, empty for null answers.
Question and option text may use CommonMark or GFM, projected as safe phrasing content; selection and tool output keep the normalized source strings.
Consequences
- The model receives a compact, deterministic tool result.
- The wait sits outside host permission policy and cannot grant a capability.
- Aborting a turn completes the pending call with skipped values.