From b9cda5bbd487399bcc908a41eaef90e02c7db9e1 Mon Sep 17 00:00:00 2001 From: Joshua Christman Date: Sat, 21 Feb 2026 23:24:44 -0600 Subject: [PATCH] fix(coding-agent): use valid JSON schema for submit_result when no output schema specified Replace Type.Any() with Type.Object({}, { additionalProperties: true }) in the submit_result tool's fallback data schema. Type.Any() serializes to {"description": "..."} which lacks the required 'type' field for valid JSON Schema. Strict providers (e.g. MiniMax, Cloud Code Assist) reject this with 400 Unrecognized schema errors. The fix produces {"type": "object", "additionalProperties": true, ...} which conforms to JSON Schema draft 2020-12 while preserving the same permissive acceptance of arbitrary structured output. Fixes schema rejection observed with: - MiniMax API (via zuccaro/bryce proxy) - Cloud Code Assist (Claude) - related to #45 Co-authored-by: Cursor --- packages/coding-agent/src/tools/submit-result.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/coding-agent/src/tools/submit-result.ts b/packages/coding-agent/src/tools/submit-result.ts index 752223702..d8e64a54b 100644 --- a/packages/coding-agent/src/tools/submit-result.ts +++ b/packages/coding-agent/src/tools/submit-result.ts @@ -89,7 +89,7 @@ export class SubmitResultTool implements AgentTool ...(normalizedSchema as object), description: `Structured output matching the schema:\n${schemaHint}`, }) - : Type.Any({ description: "Structured JSON output (no schema specified)" }); + : Type.Object({}, { additionalProperties: true, description: "Structured JSON output (no schema specified)" }); this.parameters = Type.Object({ data: Type.Optional(dataSchema),