fix(google): append continue nudge for Claude-on-Antigravity prefill - #2066
Conversation
Claude-on-Antigravity rejects a history that ends on a model turn as assistant prefill. Context compaction and interrupted-turn replay can produce that shape. Mirror the anthropic adapter's user (continue) nudge on the CCA Claude path only. Closes lidge-jun#2065
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Google adapter now appends a user ChangesClaude prefill guard
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This is a localized fix for Claude-on-Antigravity assistant-prefill histories, with the affected behavior covered by tests; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The conversation must end with a user message).previous_response_idexpansion, and interrupted-turn replay can all produce that shape.(continue)nudge (src/adapters/anthropic.ts). This applies the same guard on the CCA Claude path only, in Gemini wire format (role: "user", parts: [{ text: "(continue)" }]).Closes #2065
Related: #1916 already contains a broader
stripTrailingClaudePrefillchange, but that PR is draft, hygiene-blocked, and conflicted. This PR keeps only the prefill guard and does not take the pop-the-last-model-turn approach.Verification
bun test tests/google-claude-prefill-guard.test.ts— 5 passbun test tests/google-adapter.test.ts tests/google-antigravity-wire.test.ts tests/google-hardening.test.ts tests/google-claude-prefill-guard.test.ts tests/anthropic-tail-guard.test.ts— 86 passbun run typecheck— passbun run privacy:scan— passbun run test— 9848 pass, 8 skip, 1 unrelated flake intests/native-profile-drain-server.test.ts(reproduced green in isolation)google-antigravity/claude-opus-4-6-thinkingand an assistant-tail history returned HTTP 200Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Tests