Skip to content

fix(antigravity): resume a transient 404; plugin commands already pass through - #2470

Merged
arul28 merged 1 commit into
mainfrom
fix/antigravity-404-resume
Nov 23, 2026
Merged

arul28 merged 1 commit into
mainfrom
fix/antigravity-404-resume

Conversation

@arul28

@arul28 arul28 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Why

agy acp reports an upstream API failure as chat text plus end_turn; ADE reads the real outcome from the CLI's session log. The parser only knew the Go harness form, so Antigravity 1.5's NOT_FOUND (code 404): ... matched nothing and fell into the generic non-retryable branch: the turn died and the user had to type continue.

Same defect class as pingdotgg/t3code#39869, verified against ADE's Antigravity adapter (a verbatim port of T3's pre-patch file).

Antigravity plugins: T3's issue #28116 comes from its isolated per-instance profiles. ADE runs agy acp against the user's own ~/.gemini (no --gemini-dir, no GEMINI_HOME override, per agentChatService.ts and the Antigravity dialect), so plugins installed for the Antigravity app load and their skills arrive as ACP available_commands_update entries. ADE forwards them to the picker and hides only /logout. I added a regression test that plugin commands pass that filter; no profile-linking code was needed. If you have a specific plugin that still doesn't appear, send the chat log — that would be a different gap.

What changed

  • Parse the status form and record whether a planner response appeared after the turn started.
  • A 404 after the model answered is now retryable and carries resumeWith: "continue"; a pre-model 404 stays non-retryable.
  • The ACP host resends that one prompt on the same native session, merges both prompts' token usage into the turn, and re-runs the outcome check. Quota, 429, interrupted turns and a second failure keep today's behavior.
  • Added a plugin-command regression test.

Evidence

  • New pure parser test over a temp SQLite session log: Go-form 404 and 1.5 status-form 404 after a planner response resume; a pre-model 404 does not; 5xx is retryable without resuming; quota/reset time and the generic fallback are unchanged. Three cases fail on the pre-fix code (verified).
  • New ACP host tests: exactly one continue prompt, merged usage, and a second failure still ends the turn. Both fail on the pre-fix code (verified).
  • acpHost.test.ts 126/126 and the new outcome file 6/6 pass; desktop typecheck passes.

Not checked

Not run against a live Antigravity turn with a real 404 (needs a provider-side failure). Full CI matrix not run locally.

🤖 Generated with Claude Code


Devin Review

ADE   Open in ADE  ·  fix/antigravity-404-resume branch  ·  PR #2470

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds one automatic continue prompt when Antigravity reports a 404 after the model has answered.

  • Antigravity turns resume once when a 404 follows a planner response.
  • Antigravity's command filter keeps plugin commands available.

No actionable issues were found. This review checked source code only; it did not run tests or reproduce a live provider failure.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Send user prompt] --> B[Read result and session log]
  B --> C{404 after model reply?}
  C -- No --> D[Return outcome]
  C -- Yes --> E{Turn stopped?}
  E -- Yes --> D
  E -- No --> F[Send continue on same session]
  F --> G[Combine token usage]
  G --> H[Check resumed result]
  H --> D
Loading

Reviews (1) · Last reviewed commit: "fix(antigravity): resume a transient 404..." · Reviewed by Greptile

`agy acp` reports an upstream failure as chat text + `end_turn`; ADE reads
the real outcome from the CLI's session log. The parser only knew the Go
error form, so Antigravity 1.5's `NOT_FOUND (code 404): ...` fell into the
generic non-retryable branch and the turn died, forcing the user to type
`continue`.

Parse the status form, note when a planner response appeared after the turn
started, and resume once with `continue` when a 404 arrives after the model
answered. The resumed prompt's usage is merged into the turn. Quota, 429,
pre-model 404s and interrupted turns keep today's behavior.

Antigravity plugins: ADE already runs agy against the user's own
`~/.gemini` (no `--gemini-dir`, no GEMINI_HOME override), so plugins
installed for the Antigravity app load and their skills arrive as ACP
available commands. Added a regression test that plugin commands pass the
picker filter (only `/logout` is hidden); no profile-linking code is needed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6fa14f8 and 1e2cb50.

Files selected for processing: 5

  • apps/desktop/src/main/services/chat/acpHost/acpDialects/antigravityTurnOutcome.test.ts
  • apps/desktop/src/main/services/chat/acpHost/acpDialects/antigravityTurnOutcome.ts
  • apps/desktop/src/main/services/chat/acpHost/acpHost.test.ts
  • apps/desktop/src/main/services/chat/acpHost/acpHostTypes.ts
  • apps/desktop/src/main/services/chat/acpHost/acpSession.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

6 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +715 to +717
failure = outcomeCheck && !interrupted
? await outcomeCheck(resumed).catch(() => null)
: null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Stale log evidence on continuation

After continue returns, outcomeCheck still reads from before the original prompt. watchAntigravityTurnOutcome then marks a second 404 retryable even when the continuation never reached the model. With no new log steps, it reports the original failure again.

Learn more

The turnOutcome contract takes a snapshot before each prompt. watchAntigravityTurnOutcome captures the last SQLite step index, and lastStepAfter searches for both the newest step and any planner response beyond that index. Reusing the check makes the first prompt's planner response count for the continuation. If the continuation returns without appending a step, the original error remains the newest step for the reused check.

Example: The first prompt adds planner step 11 and error step 12. The continuation adds its user message and another 404, but no planner response. A check starting at step 12 marks the new failure non-retryable; the original check still finds step 11 and marks it retryable. The host does not send a third prompt.

Recommended fix: Prepare a fresh dialect.turnOutcome({ sessionId }) check immediately before sending continue and use only that check on its result. Keep the phase cancellable during preparation and recheck interruption before dispatch.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1e2cb50. Configure here.

permissionBridge.setTurnId(null);
publishSupervision(supervision.endTurn(turnId));
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resume runs after turn teardown

Medium Severity

The automatic continue prompt is sent after the first prompt’s finally has already cancelled permissions, cleared the turn id, ended supervision, and left turnPhase as answered. cancel() ignores anything that is not prompting, and turnAnswered is true in that window, so a Stop after the 404 text appears does not set cancelRequested and does not prevent the extra prompt. Supervision is also closed and re-closed for the same turn.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1e2cb50. Configure here.

@arul28
arul28 merged commit f263fed into main Nov 23, 2026
29 checks passed
@arul28
arul28 deleted the fix/antigravity-404-resume branch November 23, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant