Skip to content

The open source coding agent.

TypeScript

do not allow agent to ask custom-less questions

Dax Raad0187b6bb72e1
diff --git a/packages/opencode/src/tool/question.ts b/packages/opencode/src/tool/question.ts
index c6f0b91599b..a2887546d4b 100644
--- a/packages/opencode/src/tool/question.ts
+++ b/packages/opencode/src/tool/question.ts
@@ -6,7 +6,7 @@ import DESCRIPTION from "./question.txt"
export const QuestionTool = Tool.define("question", {
description: DESCRIPTION,
parameters: z.object({
- questions: z.array(Question.Info).describe("Questions to ask"),
+ questions: z.array(Question.Info.omit({ custom: true })).describe("Questions to ask"),
}),
async execute(params, ctx) {
const answers = await Question.ask({