How To Avoid Stupid Loops in Your AI Agent

Robert Ta explains why the viral Jev instant compaction method for AI agents is flawed. Deleting tool results causes models to lose context and loop repetitively, while compaction forces costly cache rewrites that outweigh token savings. Frontier models like Claude have encrypted reasoning data that compaction destroys, and modern LLMs already have built-in compaction flows that make external compaction counterproductive.
Chapters
So this person found the perfect use case for Jev instant compaction. In 2026, why is compaction still a summarization prompt? Jev can make it instant by scoring every tool call and dropping what's irrelevant. Here's Theo that came back, and I love that his tag has .gg because this was a very GG type statement against this. So it seems like a lot of people are confused, so let's break this down. This is complete misinformation, by the way. If you're an AI builder, don't think about Jev for compaction. Compaction is not a filter. The role of compaction is to clean up history to keep the agent focused, not just deleting noise. Should be used sparingly when context gets too long. Number 2, Jeff doesn't even know what to deciding on. That's something like you really get in your head. Doesn't know. So models use the context of the thread to decide what to keep or not to keep. That's model specific, harness specific. This implementation goes through on a line by line per tool call basis to decide what should be left or deleted. Not only does this 32K token context model know very little about what happened before, which newsflash should be fucking important if you're doing Highly complicated, intelligent work. But in this implementation, it doesn't even know what the result of the tool call is. Deleting these things randomly will keep the model from knowing what it's tried and dooms you to end up in stupid loops where the model keeps trying the same thing over and over. I like that, coining stupid loops. So it's autonomous goal loop, but if it's stupid, it's stupid. It doesn't matter if it's autonomous and a goal. It might be dumb. Number 3, you're giving up the reasoning entirely. Frontier models from OpenAI, Anthropic, xAI, and Google do not share reasoning traces over the API. They share encrypted payloads, which Jev cannot see and often will drop. Anthropic is even stricter with this, requiring you to preserve the entire history in order to get any of the reasoning data. As a result, using this in Claude code guarantees the model will act way dumber. Number 4, models are tuned on their compaction flows. For the past year, Frontier Labs have been including compaction and long runs as part of the training process. These models have learned ways to compact that are more effective than any rudimentary solution, such as Yolo, Jeff, help me compact, which is what this was, this viral tweet. Fun fact, if you switch models and codecs and compaction is necessary, compaction will run on that model that was previously used in the thread. Why? Because models are tuned on their compaction flows. Number 5, cache writes are more expensive than cache reads. Cache writes are the biggest cost by far for agents. I often see cache write costs go over 60% of my total LLM spend in my personal use of Cloud Code and codecs. Cache writes are insanely expensive when data earlier in the history has changed. Every history edit requires a cache rewrite for any data past the history edit. If your history is 1, 2, 3, 4, 5, 6, and you delete 2, you have to rewrite 3, 4, 5, 6. This is more expensive than leaving 2 in the history. But good news, since we're already killing off the reasoning tokens by doing this stupid compaction strategy, the rewrite cost won't actually be that high. So in this case, you do get some benefit for using this stupid tool for the stupid non-tool for a non-problem. So congrats, you get some side-class benefit for solving any of your main quest targets. Number 6, the implementation is hot garbage. Whatever is not kept is deleted permanently, but the assistant can always rerun a tool or reread a file. Good luck with that one. To be clear, this is a cool experiment. I think it's genuinely interesting. That said, if you think this style of BS filtering on probability threshold is actually a compaction strategy, highly recommend you just use the defaults in tools like Cloud Code and Codex. You're much less likely to hurt yourself that way. Well, I think the tone is a little off, but honestly, you kind of deserve it for spreading misinformation at scale. So try better next time, I'd say.










