Summary
Agents running on openai-codex/gpt-5.4 (or any openai-codex-responses API) crash silently with zero output when any MCP server is configured that exposes tools with no parameters (e.g. aws___list_regions).
The session immediately terminates with stopReason: "error" and 0 tokens consumed. From the user's perspective it looks like a model timeout or silent failure — nothing is surfaced in the UI.
Root Cause
The OpenAI Responses API requires all type: "object" tool schemas to include a properties field, even if empty. MCP tools with no parameters are typically defined as:
The API rejects this with:
Invalid schema for function 'aws___list_regions': In context=(), object schema missing properties.
This crashes the entire session — not just the offending tool call — before a single token is generated.
Two Affected Locations
1. @mariozechner/pi-ai → convertResponsesTools() (critical path)
// providers/openai-responses-shared.js
export function convertResponsesTools(tools, options) {
const strict = options?.strict === undefined ? false : options.strict;
return tools.map((tool) => ({
type: "function",
name: tool.name,
description: tool.description,
parameters: tool.parameters, // passed directly with no normalization
strict,
}));
}
Tool parameters are passed directly to the API with no schema normalization. Any type: "object" schema missing properties reaches the wire unchanged.
2. OpenClaw → normalizeToolParameters() (defence-in-depth)
The existing normalizer in auth-profiles-B5ypC5S-.js handles:
type: "object" with properties → passes through ✅
- No
type field but has properties → injects type: "object" ✅
type: "object" without properties → falls through unchanged ❌
This gap means even if a fix is applied in the normalizer, the pi-ai layer bypasses it entirely.
Fix
In both locations, normalize { type: "object" } → { type: "object", properties: {} }:
// convertResponsesTools fix
if (parameters?.type === "object" && !("properties" in parameters)) {
parameters = { ...parameters, properties: {} };
}
// normalizeToolParameters fix (additional branch)
if ("type" in schema && !("properties" in schema) && !Array.isArray(schema.anyOf) && !Array.isArray(schema.oneOf)) {
return preserveToolMeta({ ...tool, parameters: applyProviderCleaning({ ...schema, properties: {} }) });
}
These are semantically identical in JSON Schema — { type: "object" } and { type: "object", properties: {} } both mean "accept any object". The change is safe for all other providers.
Impact
- All agents on
openai-codex/gpt-5.4 with any no-parameter MCP tool configured fail completely
- Silent failure — looks like a model hang, not a schema error
- Affects any MCP server that exposes informational/query tools with no input parameters (common pattern)
Workaround
Applied a local patch to convertResponsesTools() in @mariozechner/pi-ai which resolves the issue. Verified working: agent spawns successfully, returns output, 0 tokens → 19k tokens after patch.
Summary
Agents running on
openai-codex/gpt-5.4(or anyopenai-codex-responsesAPI) crash silently with zero output when any MCP server is configured that exposes tools with no parameters (e.g.aws___list_regions).The session immediately terminates with
stopReason: "error"and 0 tokens consumed. From the user's perspective it looks like a model timeout or silent failure — nothing is surfaced in the UI.Root Cause
The OpenAI Responses API requires all
type: "object"tool schemas to include apropertiesfield, even if empty. MCP tools with no parameters are typically defined as:{ "type": "object" }The API rejects this with:
This crashes the entire session — not just the offending tool call — before a single token is generated.
Two Affected Locations
1.
@mariozechner/pi-ai→convertResponsesTools()(critical path)Tool parameters are passed directly to the API with no schema normalization. Any
type: "object"schema missingpropertiesreaches the wire unchanged.2. OpenClaw →
normalizeToolParameters()(defence-in-depth)The existing normalizer in
auth-profiles-B5ypC5S-.jshandles:type: "object"withproperties→ passes through ✅typefield but hasproperties→ injectstype: "object"✅type: "object"withoutproperties→ falls through unchanged ❌This gap means even if a fix is applied in the normalizer, the
pi-ailayer bypasses it entirely.Fix
In both locations, normalize
{ type: "object" }→{ type: "object", properties: {} }:These are semantically identical in JSON Schema —
{ type: "object" }and{ type: "object", properties: {} }both mean "accept any object". The change is safe for all other providers.Impact
openai-codex/gpt-5.4with any no-parameter MCP tool configured fail completelyWorkaround
Applied a local patch to
convertResponsesTools()in@mariozechner/pi-aiwhich resolves the issue. Verified working: agent spawns successfully, returns output, 0 tokens → 19k tokens after patch.