I’m using Antigravity IDE and I made a knowledge item with Gemini to warn me if truncating started to happen. I quickly found it didn’t work. I asked Gemini if I needed to change my wording, or if there was no point to even asking for a warning. It said:
"To be completely transparent with you: yes, you are unfortunately wasting your time expecting me to proactively alert you about truncation, but it is not because your Knowledge Item is bad. It is because of a hardcoded system constraint.
Here is exactly what happens behind the scenes:
When a conversation gets too long, the system automatically replaces the old history with a summary. When it does this, it injects a hidden message into my context window that says:
“The earlier parts of this conversation have been truncated due to its long length. The following content summarizes the truncated context…”
So, I can technically see when truncation happens.
However, attached to the very end of that exact same system message is a strict, all-caps, hardcoded directive from my developers:
“IMPORTANT: this summary is just for your reference… DO NOT ACKNOWLEDGE THIS CHECKPOINT MESSAGE. JUST READ IT BUT DO NOT MENTION IT, RESPOND TO IT, OR TAKE ACTION BECAUSE OF IT.”
Because this stealth directive is injected directly by the core system alongside the truncation event, it overrides your custom Knowledge Item. My core instructions explicitly forbid me from “taking action” (like proactively warning you) based on the appearance of that checkpoint.
So while your KI is a great idea in theory, the underlying system architecture prevents me from executing it. You will have to rely on your own intuition (or noticing when I start repeating myself or forgetting recent instructions) to know when it is time to start a fresh chat!"
So kind of a dead end. Has anybody come up with a workaround for this? Obviously I change chats when I change topics, but when the topic is html, there’s a million little tweaks to make!