Skip to content

[Bug]: Antigravity ACP turn outcome detection misses step_type=17 errors when a wrapper binary redirects --gemini-dir #43265

Not planned

Description

@Luzivog

Summary

When an Antigravity provider instance uses a custom config.binaryPath wrapper that redirects --gemini-dir to another isolated profile directory (e.g., for multi-account pooling or custom per-thread profile isolation), T3 Code's AntigravityTurnOutcome (watchAntigravityPromptOutcome) never sees step_type = 17 error rows written by agy acp, so quota and executor errors are recorded as clean completed runs instead of failed (usage_limit / provider_error).

Environment

  • T3 Code: 0.1.13-nightly.20261125.5245 (Linux)
  • Antigravity CLI: agy 1.5.16

Root Cause

  1. agy acp does not fail the JSON-RPC session/prompt request on quota or executor errors. Instead it streams a text chunk (\n⚠ Individual quota reached. Please upgrade your subscription to increase your limits. Resets in 2h12m57s.\n), resolves session/prompt with { stopReason: "end_turn" }, and records the structured protobuf error as step_type = 17 in <gemini-dir>/<app-data-dir>/conversations/<sessionId>.db.
  2. T3 detects these hidden errors in AntigravityTurnOutcome.ts by reading steps (idx, step_type, step_payload) from <profileDirectory>/antigravity-acp/conversations/<sessionId>.db before and after session/prompt (using antigravityManagedPath, which requires real non-symlink paths under T3's own profileDirectory).
  3. When a config.binaryPath wrapper redirects --gemini-dir to a different profile directory, agy writes <sessionId>.db there rather than under T3's profileDirectory. lastStepIndex / lastStepAfter see no database and return undefined.

Observed Impact

  • Every quota exhaustion (Individual quota reached, Third-party quota reached) and executor error (ECONNRESET, INVALID_THINKING_SIGNATURE, VALIDATION_REQUIRED, pre-model 404) marks the run status: "completed" with error: null.
  • usageLimitHoldsQueue is never engaged, so queued child-task wakes keep firing into the exhausted account.
  • resetAt is never parsed, runtimeRestartRequired is never set on signature/validation errors, and external failover watchers never see a failed run.

Suggested Solutions

Any of the following would close the gap cleanly:

  1. Fallback outcome detection on ⚠ terminal chunks: when the conversation DB is absent under profileDirectory and the turn produced only an agy error banner (⚠ Individual quota reached..., ⚠ Third-party quota reached..., etc.), classify the turn as usage_limit (parsing Resets in ...) / provider_error rather than silently completing.
  2. Configurable or advertised conversation DB location: let a binaryPath wrapper advertise the resolved geminiDir (or honor an opt-in env/ACP extension) when inspecting <sessionId>.db.
  3. Native multi-account Antigravity pooling: manage per-account profiles and egress directly inside T3 so external --gemini-dir redirection is unnecessary.

Activity

  1. juliusmarminge commented on Nov 26, 2026

    @juliusmarminge
    Member

    Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions