Repository navigation
fix(server): failed Antigravity edits keep the tool's error - #47152
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A failed edit with no diff got the omitted-diff marker, which made the shared ACP adapter drop the error text it would otherwise keep in diffStr. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… edits A bare failed tool_call_update keeps the earlier frame's content, so the placeholder from the in_progress frame still hid the error text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Failed Antigravity edits retain their error content instead of receiving an omitted-diff marker that can hide it. The change is limited to tool-result presentation and leaves actual edit execution unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… and provider fixes Ported 20 upstream commits (Batch 2 server/migrations/search/multi-repo + Batch 3A provider fixes): pingdotgg#46474, pingdotgg#46905, pingdotgg#46901, pingdotgg#46571, pingdotgg#46532, pingdotgg#46545, pingdotgg#46740, pingdotgg#47038, pingdotgg#47027, pingdotgg#47109, pingdotgg#46654, pingdotgg#46488, pingdotgg#46492, pingdotgg#46667, pingdotgg#46727, pingdotgg#46841, pingdotgg#46880, pingdotgg#47123, pingdotgg#47152, pingdotgg#47139. Preserved all locked T4 customizations including Lock pingdotgg#11 Antigravity promptRefusedWhileAgentWaits.
When an Antigravity file edit failed (for example, the target text was not in the file), the stored
file_changeturn item lost the agent's error message and kept only the file name and the "failed" status.normalizeAntigravityToolCalladded an "omitted" placeholder diff to edits without a hunk, and the shared ACP adapter skipsdiffStr(the field that holds the error text) for such edits. A failed edit now has those placeholders removed, including ones carried over from earlier frames of the same tool call, so its error text is kept indiffStras for other providers.Fixes #47135
Reproduction on main
Commit f96d66d (origin/main). Ran the real server (
t3 servefrom the worktree, T3CODE_DEV_SEED=0, fresh --base-dir) with the Antigravity driver set to the "Gemini API key" sign-in method, using GOOGLE_GEMINI_BASE_URL pointed at the hub. The runtime was agy 1.5.21 and the model gemini-4-hydrogen, because the hub refused gemini-4-neon. Added a scratch git project containing example.py and rant3 thread start --provider antigravity --model gemini-4-hydrogen --waitwith a prompt asking the agent to call its edit tool once with a Target string not in the file. The agent answered with the tool error "target content not found in the file; the Target must exactly match existing file text, including whitespace". In statev2.sqlite the row in orchestration_v2_projection_turn_items had type=file_change, status=failed and title "Changed files", but no diffStr or any other field holding the error. I captured the raw ACP stream by pointing the provider's binary path at a wrapper namedagythat tees stdout. agy's final tool_call_update was {status:"failed", kind:"edit", rawOutput:"target content not found…", content:[{type:"content", content:{type:"text", text:"target content not found…"}}]}, so the provider sends the failure text and T3 drops it. The failing test on factory/repro-47135 (apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts, "keeps the tool's error on a failed file change") replays those exact frames through the adapter. It fails on main: diffStr is undefined. Not checked: the Claude Code driver, because the VM has no first-party Claude login. Reading the code, ClaudeAdapterV2 puts the error text of a failed Edit/Write tool_result into diffStr, so the reporter's 71 Claude rows may come from another path, such as hook denials or rejected calls.Evidence
Reproduced using real T3 servers with fresh databases, agy 1.5.21, Gemini API key authentication and gemini-4-hydrogen. On both commits, add example.py containing print("hello"), then request one edit with a nonexistent Target and no retry. Inspect the persisted file_change row after the CLI finishes.
Reproduction driver. Captures include the real CLI replies and persisted projection payloads; synthetic paths were removed.
Not shown:
Tests
vp test run src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts src/provider/acp/AntigravityProtocol.test.ts(apps/server): 112 passedvp run check:changed: format, lint, knip, graphql, typecheck (3 packages) and tests (3 files) passNot in this change
Who did the work
Run by the t3code factory in T3 Code.