AntiGravity Agent terminated due to error, You can prompt the model to try again or start a new conversation if the error persists. Solution found
Solution :- Disable all MCP servers and then if it still occurs just give it a restart.
That's It!
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
In my case the issue was related with Awesome Skills. Here is how I solved that:
If we click on the error description, we will see something like the following:
Trajectory ID: 136ed018-d1d0-4c3c-9d5a-ec6fc5575ffd
Error: agent executor error: could not convert a single message before hitting truncation
(1) attached stack trace
-- stack trace:
| google3/third_party/jetski/cortex/cortex.(*CascadeManager).executeHelper.func1
| third_party/jetski/cortex/cascade_manager.go:2088
| [...repeated from below...]
Wraps: (2) agent executor error
Wraps: (3) attached stack trace
-- stack trace:
| google3/third_party/jetski/cortex/chatconverters/chatconverters.init
| third_party/jetski/cortex/chatconverters/trajectory_chat_converter.go:44
| runtime.doInit1
| third_party/go/gc/src/runtime/proc.go:8105
| runtime.doInit
| third_party/go/gc/src/runtime/proc.go:8072
| runtime.main
| third_party/go/gc/src/runtime/proc.go:258
| runtime.goexit
| third_party/go/gc/src/runtime/asm_arm64.s:1447
Wraps: (4) could not convert a single message before hitting truncation
Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) *withstack.withStack (4) *errutil.leafError
This specific error (could not convert a single message before hitting truncation) is a context overflow error in the AI engine (the Cortex/Jetski running behind Antigravity).
This means the agent is trying to process a message (or the conversation history) that is too large for the allowed character limit—so large that it cannot even properly "cut" (truncate) the text in a meaningful way.
The issue may be related to the size of the project/context you are opening in the IDE, not your machine itself. Google’s engine (Jetski/Cortex), used by Antigravity, has a safety mechanism: if it cannot summarize the message to fit within limits, it simply kills the executor (Agent terminated).
In the Mac Terminal
Inside your project folder in the IDE, Antigravity usually keeps a hidden cache folder storing the “Trajectory” (the history causing the error). Let’s clean it manually:
Navigate to your project root and run:
rm -rf .antigravity/
Note: If the folder doesn’t exist, look for .jetski or .cortex in the project root or your Home folder (~/).
The “Trick” – Context Configuration
The error happens because the IDE is trying to read something too large automatically. Try this in the terminal:
Check if a config file is indexing too much
cat .antigravity.json
Locating the Output Log
At the bottom of your Antigravity IDE, you’ll see a panel (where the Terminal usually is):
Click the Output tab.
On the right side, open the dropdown menu.
Select Antigravity, Antigravity Agent, Cortex, or Language Server.
Look for red lines or entries containing FATAL, ERROR, Truncation, ECONNREFUSED, 401 Unauthorized, or Out of Memory.
💡 Tip: If you see something like Reading file: ./path/to/file, that file is likely causing the agent to crash.
The Most Common Culprit: Huge Files
The error could not convert a single message before hitting truncation almost always happens because the IDE "swallowed" a file it shouldn’t have.
Example log:
Requesting planner with 8 chat messages at model retry attempt 1
Even if you start a “new chat” and type only “Hello”, the IDE may still send 8 messages (likely cached history). The truncation error occurs because the server cannot even begin processing that payload.
Antigravity (using Jetski/Cortex) stores conversation state in system temp folders, not just your project.
Run:
Close the IDE before running:
rm -rf ~/Library/Application\ Support/Antigravity/logs/*
rm -rf ~/Library/Caches/Antigravity/*
If the folder name differs, look for CloudCode or Google under Application Support.
This error often happens when preloaded instructions are already too large.
ls -lh ~/.gemini/GEMINI.md
If it’s large, clear it:
echo "" > ~/.gemini/GEMINI.md
Remove Local Skills
rm -rf ~/.gemini/antigravity/skills/*
Final Verdict
After analyzing logs and researching, the repository antigravity-awesome-skills is the direct cause of the truncation error and the “8 messages”.
These skills act as system prompts. When installed, the IDE injects all their definitions into the conversation context. Since this repository contains many large Markdown files, it exceeds the token limit accepted by Google’s servers.
Fix Steps
Because skills count as initial context messages. Removing them reduces this number.
Final Procedure
Close the IDE.
Run:
killall Antigravity
Reopen the IDE.
Type “Hello”.
👉 The truncation error should disappear.
Optional: Clean Installation from NPX
rm -rf ~/.gemini/antigravity/skills
rm -rf ~/.gemini/antigravity/rules
echo "" > ~/.gemini/GEMINI.md
rm -rf ~/.antigravity/bin
npm uninstall -g antigravity-awesome-skills 2>/dev/null
Conclusion from New Logs
The truncation error is gone ✅
The system now successfully connects to Google APIs
Chat messages dropped from 8 → 7
Remaining warnings (TLS, loading) are harmless
Best Practices (Solution)
Use .antigravity.md or .cursorrules inside your project instead of global config.
Loading skills on demand drastically reduces token usage:
50 skills → ~10,000 tokens per request
1 skill → ~200 tokens
This prevents truncation errors and avoids hitting your plan limits.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.