Repository navigation
fix(antigravity): compact MCP schemas on the stdio bridge - #3
Draft
Harold Hunt (huntharo) wants to merge 1 commit into
Draft
Harold Hunt (huntharo) wants to merge 1 commit into
Harold Hunt (huntharo) wants to merge 1 commit into
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosNo All 64 scenario measurements
Baseline: unavailable · PR result: 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Antigravity’s stdio MCP bridge sends full argument schemas for every listed T3 tool up front. The pinned CLI fixes the callable tool names for the active turn, so removing declarations wholesale would make those tools unreachable during that turn.
Change
orchestrator_capabilities,delegate_task,task_status, andtool_search. Other declarations use a generic object schema. Exact-nametool_searchsupplies the original argument schema, and the MCP server validates calls against it.T3CODE_ANTIGRAVITY_THEME_BROKER=1catalog advertises the three core tools directly, plustool_searchandcall_t3_tool. It omits the nativet3_theme_readdeclaration and exposes that read as the broker’s sole target. Discovery and execution reuse the thread’s scoped MCP credential. Antigravity’s Supervised approval and the target’s server-side validation still apply.Scope
Product and product tests only. Stacked on pwrdrvr/t3code#2. The request-size problem overlaps upstream issue #38123 and the open proxy proposal #39362.
Verification
Authenticated WebSocket runs used pinned agy 1.5.16, Gemini 3.1 Pro Preview at low effort, macOS arm64, fresh synthetic state and a loopback model endpoint. Totals are outbound request-body bytes across all primary and auxiliary calls. Each column uses the same prompt across the three configurations. The theme turn uses the native read in the stock and compact configurations and discovery plus the broker in the opt-in configuration.
The theme broker was advertised on every primary model request in the turn, and the native theme declaration was absent. Search returned the full theme schema and the approved broker call returned the real handler result in the same T3 turn. Declining the broker call prevented execution. A numeric
themeIdfailed target validation, andt3_theme_setwas rejected.The focused product and MCP eval-grader run passed 1,427 tests across 12 files, including the generic ACP adapters and MCP access checks.
vp run check:changed 3ffb0cadc208c12ef19732fbcf6b50ef6321a10dpassed, including typechecks for 27 affected packages. The MCP tool-use context check and four theme dry runs completed locally. Credentialed model evals were skipped because they call real providers.Implemented with GPT-6 on Codex.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.