Skip to content

fix(acp): bridge Antigravity native ask_question on custom agents (#1024) - #1127

Open
ana52070 wants to merge 1 commit into
spacering-net:mainfrom
ana52070:fix/antigravity-custom-agent-ask
Open

ana52070 wants to merge 1 commit into
spacering-net:mainfrom
ana52070:fix/antigravity-custom-agent-ask

Conversation

@ana52070

@ana52070 ana52070 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What was wrong

In #1043, Antigravity's native interaction questions (interaction_<hex>) were bridged into Codeg's interactive question card, avoiding permission traps and restoring user selections in session history.

However, try_bridge_antigravity_ask and take_antigravity_answered_close strictly checked state.read().await.agent_type == AgentType::Antigravity. When running Antigravity under a custom agent configuration (such as custom:antigravity-b), the agent type evaluates to AgentType::Custom(...). Consequently:

  1. Native ask_question tool calls were rejected by try_bridge_antigravity_ask and fell back to generic tool permission approval prompts ("Allow Once / Allow Always / Deny").
  2. The closing update frame (rawOutput: "Response received") was not intercepted by take_antigravity_answered_close, potentially overwriting answers with "no selection".

The change

  • Bridge Gating Alignment: In src-tauri/src/acp/connection.rs, updated try_bridge_antigravity_ask to allow both AgentType::Antigravity and AgentType::Custom(_) alongside is_antigravity_interaction_id, enabling custom agents running Antigravity while keeping other built-in agents (e.g. Codex) guarded against look-alike tool call IDs.
  • Closing Frame Drop: Updated take_antigravity_answered_close to recognize and consume answered interaction closures across both built-in AgentType::Antigravity and custom agents running Antigravity (AgentType::Custom(_)).
  • Unit Tests:
    • Extended antigravity_interaction_round_trip_preserves_choice_and_gates to verify round-trip question bridging on AgentType::Custom("antigravity-b").
    • Extended antigravity_interaction_frames_do_not_overwrite_the_bridged_card to ensure custom agent interaction updates are properly handled.

Tests

  • cargo check --bin codeg: Passed with 0 errors.
  • cargo clippy --bin codeg -- -D warnings: Passed with 0 warnings.
  • cargo check --no-default-features --features server-bin --bin codeg-server: Passed with 0 errors.
  • cargo check --no-default-features --features mcp-bin --bin codeg-mcp: Passed with 0 errors.

@ana52070
ana52070 force-pushed the fix/antigravity-custom-agent-ask branch from 626dbc4 to 623d7ab Compare November 11, 2026 06:30
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