You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Anthropic 400: messages.0.content.N.text.text Field required (message content serialization) #420
Anthropic 400: messages.0.content.N.text.text Field required — malformed content block in messagesToAnthropicFormat
When using an Anthropic (Claude) backend, the proxy returns 400 with messages.0.content.11.text.text: Field required. The content block at that index has a text field that is an object instead of a string, or is missing the text field entirely. This is in message content serialization (messagesToAnthropicFormat), not tool schema normalization (#75 / #76).
Reproduction
ocx start
Configure provider as Anthropic Claude (claude-opus-4-6-thinking or claude-sonnet-4-20250514) via any upstream (e.g. google-antigravity)
Use Codex for a session with multiple tool calls (shell_command, apply_patch, etc.) until conversation history is large
On the next request, observe 400 error:
Provider error 400: {"type":"error","error":{"type":"invalid_request_error","message":"messages.0.content.11.text.text: Field required"}}
@BuomEm Hmm, this bug is fixed already and i can use model from Antigravity really smooth. You should reinstall or show me how you connect to Codex/Claude/Github Copilot App and i will support you how to fix it.
🔒 Fix in progress — assigned to the maintainer integration pass
@lidge-jun (maintainer) is actively working this issue. Please do not open a competing PR
for it until this marker is removed; duplicate work would have to be discarded.
The fix is being integrated on the maintainer branch codex/260725-pr-rework (based on dev) together with regression coverage that pins the reported failure mode. Verification
before merge: bun run typecheck, the full bun run test suite, bun run privacy:scan, bun run lint:gui, then exact-SHA hosted Cross-platform CI and Service lifecycle.
This issue will be closed with an evidence comment naming the integration commit SHA, the
code that closes each reported path, and the verification output. If you have additional
reproduction detail, it is still very welcome here.
Integration tracker: devlog/_plan/260725_pr_issue_rework · marker posted by the maintainer integration pass
Commit:74795ad6 (PR #430 by @snowyukitty) · merged into dev atebc62d1f
Every serialization branch that could emit an empty or malformed content part is now closed in src/adapters/google.ts:
a user/developer message with empty string content emits a non-empty placeholder instead of {"text":""}
empty or malformed text parts are dropped; if that leaves nothing, the placeholder is used
an assistant turn with no emittable parts is skipped entirely rather than sent as parts: []
an empty tool result gets its own placeholder instead of a phantom [image] marker
Antigravity translates these Gemini contents into Anthropic messages, and a proto3 empty string is omitted from the translated JSON — which is why this surfaced as messages.N.content.M.text.text: Field required only on Claude-through-Antigravity.
Verification
bun test tests/google-empty-content.test.ts: 14 pass / 0 fail
Reverting the guard fails 12 of those 14, so the fix is demonstrably what closes the path
Full suite at merge: 4222 pass / 0 fail (327 files); typecheck, privacy scan, GUI lint all clean
Cross-platform CI on ebc62d1f: success on ubuntu, macOS, and Windows (6/6 jobs)
Thanks for the report — the empty-parts assistant turn was the harder half to spot.
Activity
HaydernCenterpoint commentedon Jul 25, 2026
@BuomEm Hmm, this bug is fixed already and i can use model from Antigravity really smooth. You should reinstall or show me how you connect to Codex/Claude/Github Copilot App and i will support you how to fix it.
BuomEm commentedon Jul 25, 2026
Thanks for the response. I tried doing a clean reinstall, but the issue still persists.
First, I removed OpenCodex using both:
Then I reinstalled it with:
After reinstalling, I started seeing this warning:
More importantly, the original Antigravity error still occurs:
So a complete uninstall and reinstall did not resolve the
messages.0.content.N.text.text: Field requiredissue.I’m still able to reproduce the same Antigravity 400 error after a clean reinstall.
lidge-jun commentedon Jul 25, 2026
🔒 Fix in progress — assigned to the maintainer integration pass
@lidge-jun (maintainer) is actively working this issue. Please do not open a competing PR
for it until this marker is removed; duplicate work would have to be discarded.
The fix is being integrated on the maintainer branch
codex/260725-pr-rework(based ondev) together with regression coverage that pins the reported failure mode. Verificationbefore merge:
bun run typecheck, the fullbun run testsuite,bun run privacy:scan,bun run lint:gui, then exact-SHA hostedCross-platform CIandService lifecycle.This issue will be closed with an evidence comment naming the integration commit SHA, the
code that closes each reported path, and the verification output. If you have additional
reproduction detail, it is still very welcome here.
Integration tracker:
devlog/_plan/260725_pr_issue_rework· marker posted by the maintainer integration passfix(google): never emit empty or malformed content parts (#420)
lidge-jun commentedon Jul 25, 2026
Fixed in
devCommit:
74795ad6(PR #430 by @snowyukitty) · merged intodevatebc62d1fEvery serialization branch that could emit an empty or malformed content part is now closed in
src/adapters/google.ts:{"text":""}parts: [][image]markerAntigravity translates these Gemini
contentsinto Anthropicmessages, and a proto3 empty string is omitted from the translated JSON — which is why this surfaced asmessages.N.content.M.text.text: Field requiredonly on Claude-through-Antigravity.Verification
bun test tests/google-empty-content.test.ts: 14 pass / 0 failebc62d1f: success on ubuntu, macOS, and Windows (6/6 jobs)Thanks for the report — the empty-
partsassistant turn was the harder half to spot.fix(ci): silence English translation bookkeeping and harden related-i…
fix(google): never emit empty or malformed content parts (lidge-jun#420)
fix(ci): silence English translation bookkeeping and harden related-i…