Repository navigation
fix(antigravity): a long shell command keeps its start, not its last 8,000 characters - #40702
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…8,000 characters Command lines were bounded like output, keeping the tail under '[Earlier output truncated]'. A command line's program and target are at its start, so bound it from the head with a '[Command truncated]' marker. Fixes #40695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
In an Antigravity thread, a shell command over 8,000 characters was saved and shown as its last 8,000 characters under "[Earlier output truncated]". That lost the program, flags and target (e.g.
cat > notes.md <<'EOF') and called the command 'output'. Command lines are now cut from the end instead: they keep their start and end with a[Command truncated]marker. Command output still keeps its tail as before.Fixes #40695
Reproduction on main
Commit c1fbdf6 (origin/main). Linux VM,
T3CODE_DEV_SEED=0 vp run dev(fresh database), Antigravity provider set to sign-in method 'Gemini API key', runtime 1.5.14 (agy on PATH). Every hub model (gemini-3.8-flash, gemini-4-neon, gemini-4-hydrogen) failed with a 429 'Individual quota reached, resets in ~116h'. So GOOGLE_GEMINI_BASE_URL was pointed at a local stand-in for the Gemini streamGenerateContent API that answers with agy's ownrun_commandfunction call (CommandLine = a 9,686-charactercat > notes.md <<'EOF'+ 140 lines +EOF). Real agy and the real T3 server handled everything else. Rant3 thread start --provider antigravity --model gemini-4-neon --option runtimeMode=full-access <project> "Write a ~10 KB notes.md with one shell heredoc.". The turn completed, and agy wrote notes.md complete (140 lines, 9,660 bytes). T3's saved tool item holds the command as[Earlier output truncated]\n\n24: the quick brown fox…(8,028 chars), andcat > notes.mdappears nowhere in the stored event. In the web client, the thread's work log row reads[Earlier output truncated] 24: the quick brown fox jumps over the lazy dog, notes entry. .... The failing test on factory/repro-40695 (AntigravityProtocol.test.ts, 'keeps the start of a long command line, where the program and target are') sends a heredoc CommandLine through parseSessionUpdateEvent + normalizeAntigravityToolCall. It fails on main (command does not start with the heredoc head); the other 44 tests pass.Evidence
Real web clients on Linux, Chromium, light theme, 1280×800; fresh isolated databases. Real agy 1.5.14 used Gemini API-key mode with a local Gemini streaming API fixture returning the same 10,278-character heredoc command on both commits. Start the thread, wait for completion, then expand its work log and command. Both executions wrote identical complete files (140 lines, 10,252 bytes).
Gemini API fixture · Seed and CLI reproduction script · Runtime observations
Tests
vp test run src/provider/acp/AntigravityProtocol.test.ts(apps/server): 45 passed. With the fix reverted, the repro test and the updated Unicode test fail.vp test run apps/server/src/provider/acp/: 8 files, 183 passedvp run check:changed: format, lint, knip, typecheck (3 packages) and tests (2 files, 47) all passNot in this change
packages/provider-acp(runtimeModel.ts) andpackages/provider-core(McpProviderSessions.ts) have their own '[Earlier output truncated]' cuts for generic tool content; this change does not touch them.Who did the work
Run by the t3code factory in T3 Code.