[BUG] Vertex AI: 400 "diagnostics: Extra inputs are not permitted" — new top-level diagnostics request field rejected (same class as #37746 output_config)
Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 30, 2026
Environment
- Claude Code v2.1.220 (autoUpdatesChannel: latest), macOS (Darwin 25.5)
CLAUDE_CODE_USE_VERTEX=1,CLOUD_ML_REGION=global- Model: claude-fable-5 (session also had earlier claude-opus-5 turns)
What happens
Mid-session, every /v1/messages request starts failing with:
API Error: 400 diagnostics: Extra inputs are not permitted
The Pydantic error path is the bare top-level field (diagnostics, not messages.N.diagnostics), i.e. Vertex is rejecting a top-level diagnostics field in the request body. Once it starts the session is unusable: the main loop 400s on every turn, and Workflow-tool subagents die with the same error mid-run (2 of 6 agents in one workflow). Retrying / "continue" does not recover.
Evidence it is the client-side diagnostics field, feature-gated
- Affected sessions' transcripts stamp
"diagnostics": nullonto every stored assistant message (message.diagnostics, hundreds of occurrences). An unaffected session on the same machine, same v2.1.220, same model, same Vertex project has zero occurrences and works fine — so the field is gate-controlled per process, not version-tied. - The field is already known to exist and carry
previous_message_idfrom reports against the direct API, e.g. #76008 and #73776 (400 diagnostics.previous_message_id: must be the id from a prior /v1/messages response). The direct API recognizes the field and validates its contents; Vertex rejects it outright as an unknown key.
Precedent — same bug class, previously fixed for a different field
- #37746: Vertex rejecting
output_configwith the identical "Extra inputs are not permitted" error - CHANGELOG v2.1.122: "Fixed Vertex AI / Bedrock returning
invalid_request_error: output_config: Extra inputs are not permittedon session-title generation and other structured-output queries" - CHANGELOG v2.1.113: similar fix for
CLAUDE_CODE_EXTRA_BODYoutput_config.efforton Vertex
Whatever strips first-party-only request fields for Vertex/Bedrock does not cover diagnostics.
Expected
Omit diagnostics on Vertex/Bedrock requests (as was done for output_config), or disable the gated feature when CLAUDE_CODE_USE_VERTEX/CLAUDE_CODE_USE_BEDROCK is set.