From dd34bd820348fbb0ae48171d34c42d3cdad3fd39 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Mon, 13 Apr 2026 21:54:45 -0400 Subject: [PATCH] fix question request schema encoding Decode pending question requests through the Schema.Class constructor path so the HttpApi list endpoint returns valid Question.Request instances while keeping QuestionID as a newtype. --- packages/opencode/src/question/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/question/index.ts b/packages/opencode/src/question/index.ts index 2373e8c416..2675736169 100644 --- a/packages/opencode/src/question/index.ts +++ b/packages/opencode/src/question/index.ts @@ -161,12 +161,12 @@ export namespace Question { log.info("asking", { id, questions: input.questions.length }) const deferred = yield* Deferred.make, RejectedError>() - const info: Request = { + const info = Schema.decodeUnknownSync(Request)({ id, sessionID: input.sessionID, questions: input.questions, tool: input.tool, - } + }) pending.set(id, { info, deferred }) yield* bus.publish(Event.Asked, info)