Summary
When using GPT-5.4 (via OpenRouter) with OpenClaw 2026.3.24 (cff6dc9), asking the agent to create a cron job results in an infinite retry loop. The agent sends job: {} on every cron.add call, and the gateway rejects it with INVALID_REQUEST.
Root Cause
In the bundled file dist/pi-embedded-BaSvmUpW.js, the CronToolSchema defines the job parameter as:
job: Type.Optional(Type.Object({}, { additionalProperties: true }))
This produces the following JSON Schema fragment:
{
"job": {
"type": "object",
"properties": {},
"additionalProperties": true
}
}
Because properties is an empty object, GPT-5.4 strictly follows the schema and sends job: {}. The gateway then rejects this as invalid, the agent retries, and the loop continues (aseq reaching 300+).
Reproduction
- Install
[email protected]
- Ask the agent: "Create a cron job that says hello every 3 minutes"
- Observe session logs — every
cron.add call sends job: {}
Expected Behavior
The job property should have explicit sub-properties so the model knows what fields to populate. For example:
job: Type.Optional(Type.Object({
name: Type.Optional(Type.String()),
schedule: Type.Optional(Type.Object({
kind: Type.String(), // "every" | "cron"
everyMs: Type.Optional(Type.Number()),
cron: Type.Optional(Type.String()),
})),
payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: payload: paylol(Type.String()),
wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal(Type.Strin wakeMode: Typet- wakeMode: Type.Op onal(Type.Strin wakeMode: Type.Op onal( with the explicit schema above.
- After patching, GPT-5.4 correctly sends fully-populated `job` objects:
```json
{
"job": {
"name": "hello-cron",
"schedule": { "kind": "every", "everyMs": 180000 },
"sessionTarget": "main",
"payload": { "kind": "systemEvent", "text": "Hello world" },
"wakeMode": "reuse-or-create",
"delivery": "enqueue",
"enabled": true
}
}
Environment
- OpenClaw: 2026.3.24 (cff6dc9)
- Model: openrouter/openai/gpt-5.4
- OS: macOS (also tested in Docker/Node 22 Alpine)
- Node: 22.x
Summary
When using GPT-5.4 (via OpenRouter) with OpenClaw 2026.3.24 (cff6dc9), asking the agent to create a cron job results in an infinite retry loop. The agent sends
job: {}on everycron.addcall, and the gateway rejects it withINVALID_REQUEST.Root Cause
In the bundled file
dist/pi-embedded-BaSvmUpW.js, theCronToolSchemadefines thejobparameter as:This produces the following JSON Schema fragment:
{ "job": { "type": "object", "properties": {}, "additionalProperties": true } }Because
propertiesis an empty object, GPT-5.4 strictly follows the schema and sendsjob: {}. The gateway then rejects this as invalid, the agent retries, and the loop continues (aseq reaching 300+).Reproduction
[email protected]cron.addcall sendsjob: {}Expected Behavior
The
jobproperty should have explicit sub-properties so the model knows what fields to populate. For example:Environment