Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
+1 — hit this exact issue in a long-running iOS development thread using Antigravity ACP ( After several I verified locally that switching |
Problem
When an Antigravity ACP thread produces a large tool output (for example, an unbounded
rgsearch that stores an ~8.8 MiB step payload in Antigravity's conversation SQLite DB),antigravity-acpemits a JSON-RPC notification line larger than 16 MiB on stdout.makeAntigravityStdoutTransforminapps/server/src/provider/antigravityAuthSupport.tsbuffers every stdout line in full until\njust to check the 56-byteANTIGRAVITY_AUTH_STDOUT_PREFIX, and rejects any line overmaxStdoutLineBytes(16 MiB) withAcpTransportError: Antigravity sent a protocol line that is too large.. Because the oversized step stays persisted in the Antigravity conversation DB, every subsequent turn (session/load+session/prompt, model switch, or compaction) replays that step and fails again within ~140 ms, permanently bricking the thread withProvider turn failed..Downstream
packages/effect-acp/src/protocol.ts(makeStrictNdJsonRpcParser) already handles multi-megabyte NDJSON lines without a 16 MiB cutoff.Change
makeAntigravityStdoutTransformas a 3-state streaming prefix matcher (prefix→passthrough/auth) instead of buffering entire protocol lines.{) are forwarded chunk-by-chunk with zero line buffering as soon as a byte disagrees with the 56-byteANTIGRAVITY_AUTH_STDOUT_PREFIX.ANTIGRAVITY_AUTH_STDOUT_PREFIXremain bounded bymaxBrowserHelperLineLength(~16 KiB) and fail fast with"Antigravity returned an invalid Google sign-in URL."if exceeded, preserving bounded memory in the transform.apps/server/src/provider/antigravityAuthSupport.test.tsto cover >16 MiB streamed JSON-RPC lines followed by a login line, cross-chunk partial prefix mismatches, and oversized login line rejection.Scope
Small, focused bug fix for a real failure observed in T3 Code Nightly when an Antigravity thread hit the 16 MiB stdout transform limit and became permanently unusable. No separate issue needed per
CONTRIBUTING.md.Verification
Ran focused checks in
/apps/serverwith Node 26.13.1:vp test run src/provider/antigravityAuthSupport.test.ts— 33 passed (including streaming a 17 MiB JSON-RPC line followed by an auth URL line, cross-chunk partial prefix mismatches, and oversized login line rejection).vp test run src/provider/acp/AntigravityAcpSupport.test.ts src/provider/AntigravityAuth.test.ts src/provider/AntigravityProvider.test.ts— all passed (97 tests across 3 files).vp fmt --check apps/server/src/provider/antigravityAuthSupport.ts apps/server/src/provider/antigravityAuthSupport.test.ts— clean.vp lint --report-unused-disable-directives apps/server/src/provider/antigravityAuthSupport.ts apps/server/src/provider/antigravityAuthSupport.test.ts— 0 warnings, 0 errors.effect-tsgo tsrs -p tsconfig.json --noEmitinapps/server— exit 0.Not run: repo-wide
vp run check:changed(only server/scripts/oxlint workspace dependencies were installed locally; CI covers the full suite).Implemented with Gemini 4 Neon via Antigravity harness in T3 Code.