I am experiencing a recurring issue where the agent fails to execute due to a message truncation error. Below are the specific details and stack trace from the crash.
Environment & Metadata:
Date Occurred: March 9, 2026
Version: 1.20.5
Trajectory ID: `def09238-2fdd-4cee
Error Message:Error: agent executor error: could not convert a single message before hitting truncation
Error: agent executor error: could not convert a single message before hitting truncation
This error means the AI agent’s context window is full, often due to excessive information from enabled tools or services. You can try the workarounds suggested here to prevent this issue.
Claude is okay, but Gemini gets this error even at the start of a new session.
And instead of thinking about the actual question, its thought process looks like this:
Refining Operational Protocols I’ve been meticulously refining my operational protocols. I’m actively avoiding the use of ‘cat’ for file creation or appending, opting for more secure and efficient methods. I’m prioritizing grep_search over grep within Bash commands, and steering clear of ‘ls’ and ‘cat’ for simple listing and viewing tasks. The goal is to optimize and reinforce security.
Listing Relevant Tools I’m now focusing on tool selection for specific tasks. I need to locate todo.md or plan.md. I’ve listed list_dir and find_by_name as potential options, remembering Windows file names are case-insensitive. Before execution, I intend to verify MEMORY.md’s current status, so I’ll utilize view_file on its recent lines.
Odd how the thought process when I want Gemini to figure things out on it’s own looks like yours for the first step. Even when specifying a skill to reduce the context window still produces this error for Pro and Flash regardless. I am working on a small website, nothing too extreme, and far smaller than my other projects in Kiro and even AI Studio, but Antigravity has been unable to even do anything without Claude assistance for weeks.