From ec857fece5de510bd6d9ca5a4218d0bad2d2c3cd Mon Sep 17 00:00:00 2001 From: Vegard Stikbakke Date: Thu, 2 Jul 2026 09:01:02 +0200 Subject: [PATCH] fix(coding-agent): set executionMode: sequential on question example tool The question extension tool blocks on ctx.ui.custom() but omitted executionMode, so multiple question calls in one assistant turn ran under the default parallel mode and raced on the editor slot. Only the last question rendered; earlier calls hung pending forever. Set executionMode: "sequential" so the agent loop serializes the batch. Wrappers already propagate the field to the core. closes #6189 --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/examples/extensions/question.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index f43cdce46..d99777d74 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed +- Fixed the question extension example to run question tool calls sequentially so multiple questions in one assistant turn remain answerable ([#6189](https://github.com/earendil-works/pi/issues/6189)). - Fixed `/login` to report auth storage persistence failures instead of claiming credentials were saved when `auth.json` is locked ([#6223](https://github.com/earendil-works/pi/issues/6223)). - Fixed split-turn compaction to serialize summary requests so single-concurrency local providers do not fail with 429 errors ([#5536](https://github.com/earendil-works/pi/issues/5536)). - Fixed custom session entries appended during assistant streaming to render before the live assistant message, matching persisted session order. diff --git a/packages/coding-agent/examples/extensions/question.ts b/packages/coding-agent/examples/extensions/question.ts index 1192b4904..c877f8ef4 100644 --- a/packages/coding-agent/examples/extensions/question.ts +++ b/packages/coding-agent/examples/extensions/question.ts @@ -47,6 +47,7 @@ export default function question(pi: ExtensionAPI) { label: "Question", description: "Ask the user a question and let them pick from options. Use when you need user input to proceed.", parameters: QuestionParams, + executionMode: "sequential", async execute(_toolCallId, params, _signal, _onUpdate, ctx) { if (ctx.mode !== "tui") {