-
-
Notifications
You must be signed in to change notification settings - Fork 52.8k
Closed
Description
Summary
When using google-antigravity provider (Cloud Code Assist), requests fail with a schema validation error for the cron tool (tool index #9).
Error Message
Cloud Code Assist API error (400): {
"error": {
"code": 400,
"message": "{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.9.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use.\"},\"request_id\":\"req_vrtx_011CWqrgWryHbJJhnzxirXcr\"}",
"status": "INVALID_ARGUMENT"
}
}
Root Cause
The cron tool schema in src/agents/tools/cron-tool.ts has complex nested structures that pass Anthropic's direct API validation but fail Google Cloud Code Assist's stricter JSON Schema draft 2020-12 enforcement:
- Deeply nested
anyOfunions -CronScheduleSchema,CronPayloadSchema,sessionTarget,wakeMode,channelall use TypeBoxType.Union()which compiles toanyOf - Mixed
additionalProperties-falseinside nested objects buttrueat the root level minLength: 1constraints on strings viaNonEmptyString
The cleanSchemaForGemini() function in src/agents/pi-tools.ts attempts to normalize schemas but doesn't fully handle these nested union cases.
Workaround
Adding cron to the tool deny list allows google-antigravity to work:
{
"agent": {
"tools": {
"deny": ["cron"]
}
}
}Suggested Fix
Either:
- Simplify the
CronToolSchemato avoid deeply nested unions (flatten to a single object with optional fields) - Enhance
cleanSchemaForGemini()to recursively simplify nestedanyOfstructures - Add provider-specific schema transformations for google-antigravity
Environment
- Clawdbot version: 2026.1.5-3
- Provider: google-antigravity
- Model: claude-opus-4-5-thinking
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels