Claude model error after short use

2026-03-10 20:20:12.152 [info] I0310 20:20:12.151678 18428 planner_generator.go:288] Requesting planner with 144 chat messages at model retry attempt 1 and API retry attempt 1

2026-03-10 20:20:13.818 [info] E0310 20:20:13.818108 18428 log.go:380] agent executor error: INVALID_ARGUMENT (code 400): invalid_request_error: prompt is too long: 211606 tokens > 200000 maximum: INVALID_ARGUMENT (code 400): invalid_request_error: prompt is too long: 211606 tokens > 200000 maximum

Hi @Kuro ,

Hello, Thank you for bringing these concerns to our attention. Please be assured that I have shared your feedback with our internal team for further review.

This actually isn’t an OOM crash on your machine. You hit the AI model’s maximum token limit. Your logs show you sent 211,606 tokens, which exceeds the 200,000 token maximum. The API rejected the request with an ‘INVALID_ARGUMENT’ error, which is why the agent terminated. You’ll need to clear your chat history or reduce the context you’re sending.

1 Like

This has nothing to do with it. Even with an empty history and a single word like “hi,” the model goes haywire after a while.

If you’re hitting the 200k limit on ‘hi’, it means the agent is injecting your entire codebase into the prompt automatically. Check what folder you have open. If the IDE is scanning a massive folder like node_modules or .git in the background, it maxes out the context window before it even reads your message. Try testing it in a brand new, empty folder to confirm

1 Like

I tested it with no files open, and after a while it still became saturated.

Even with closed tabs and a fresh chat, Antigravity’s agent still reads your active workspace folder in the background. If you have a large project open in the sidebar, it’s reading all those file names and summaries the second you say ‘hi’. Try completely closing the folder (File > Close Folder) to test it. If it doesn’t crash, the fix is just adding your heavy directories to a .gitignore.

What makes you think that? If that’s the case, why does it explicitly tell me when it’s reading specific files? Why do I have to remind it to read rules files?

Hey Steve, there’s a big difference between the IDE sending a Workspace Map and the agent explicitly reading a file. In the background, Antigravity constantly sends a ‘File Tree’ (a massive list of your folder structures, file names, and basic outlines) hidden in the system prompt so the agent knows how to navigate your project. If you haven’t ignored heavy folders like node_modules or .git, that hidden map alone can be massive. When the agent explicitly tells you it is ‘reading a file’, it’s using a specific tool to fetch the full, exact code inside a file. But the giant map of your workspace is still being sent silently with every single message.

1 Like

There is a small repo that might work around this issue: GitHub - lehoa1806/coogent: A deterministic Master-Worker orchestrator for the Antigravity IDE that eliminates AI context collapse through strictly scoped, ephemeral agent execution. · GitHub