Skip to content

[Bug] google-antigravity Claude 400s after compaction: assistant message prefill #2065

Description

@jeongjin0

Client or integration

Codex App

Area

Provider adapter

Summary

google-antigravity Claude turns fail after context compaction with HTTP 400:

This model does not support assistant message prefill. The conversation must end with a user message.

I expected the compacted turn to continue. The Anthropic adapter already appends a user (continue) nudge when history ends on an assistant turn (src/adapters/anthropic.ts, commit 30d17526). The Google adapter does not apply the same guard on the Claude-on-Antigravity path, so a model-tail history reaches Cloud Code Assist and Claude rejects it.

Gemini-native Antigravity models are unaffected. Anthropic direct (anthropic/claude-*) is unaffected.

Reproduction

  1. ocx start --port 10100
  2. In Codex App, select google-antigravity/claude-opus-4-6-thinking.
  3. Run a long turn until context compaction fires.
  4. On the next automatic continuation, the proxy returns 400.

The same 400 reproduces from a minimal assistant-tail history, without waiting for compaction: user text followed by an assistant text turn and no trailing user message.

Version

2.25.0

Operating system

macOS 15

Provider and model

google-antigravity / claude-opus-4-6-thinking

Logs or error output

Provider error 400: Antigravity invalid request: {"type":"error","error":{"type":"invalid_request_error","message":"This model does not support assistant message prefill. The conversation must end with a user message."}}

Screenshots and supporting files

N/A

Redacted configuration

{
  "google-antigravity": {
    "adapter": "google",
    "googleMode": "cloud-code-assist",
    "models": ["claude-opus-4-6-thinking", "claude-sonnet-4-6"]
  }
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Related: #1916 already contains a broader Claude CCA prefill change (stripTrailingClaudePrefill), but that PR is draft, hygiene-blocked, and conflicted. There is no standalone issue for this 400.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproviderProvider adapters, OpenAI-compat presets, upstream API quirks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions