-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
The cron agent tool rejects valid job structures that the CLI (clawdbot cron add) accepts and the Gateway processes correctly.
Reproduction
Agent tool call:
{
"action": "add",
"job": {
"name": "morning-brief",
"sessionTarget": "main",
"schedule": {
"kind": "cron",
"expr": "0 7 * * *",
"timezone": "Europe/London"
},
"payload": {
"kind": "systemEvent",
"text": "Test message"
}
}
}Error:
invalid cron.add params: at /schedule: must have required property 'atMs';
at /schedule: unexpected property 'expr'; at /schedule: unexpected property 'timezone';
at /schedule/kind: must be equal to constant; at /schedule: must have required property 'everyMs';
at /schedule: must match a schema in anyOf; at /payload/kind: must be equal to constant;
at /payload: must have required property 'message'; at /payload: unexpected property 'text';
at /payload: must match a schema in anyOf
Expected behavior
The tool should accept the same job structure that the CLI accepts:
clawdbot cron add --name "test" --cron "0 7 * * *" --tz "Europe/London" \
--session main --system-event "Test"This works and creates:
{
"schedule": { "kind": "cron", "expr": "0 7 * * *", "tz": "Europe/London" },
"payload": { "kind": "systemEvent", "text": "Test" }
}Root cause hypothesis
The JSON Schema for the cron tool's job parameter appears to define schedule and payload as discriminated unions (anyOf) but:
- The
kinddiscriminator isn't being recognized (error: "must be equal to constant") - Fields like
expr,timezone,textare marked as "unexpected" even though they're valid for their respectivekindvariants - The schema may be requiring all fields from all variants simultaneously
Workaround
Use the CLI directly instead of the agent tool.
Environment
- Clawdbot 2026.1.24-3 (885167d)
- Node v22.17.0
- macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working