What happens when an agent's conversation exceeds its context window?
Depends on the provider: some APIs reject the request with a hard error once a conversation exceeds the context limit, others silently drop the oldest turns and answer as if nothing was cut. The hard error comes from major hosted APIs like OpenAI, Anthropic, and Google; the silent truncation shows up more in proxies and OpenAI-compatible local runtimes like LM Studio.
The second behavior is the one worth building for. A silently truncated call means the agent answers from a conversation it didn’t fully see, and the response reads exactly like one built from the whole thing: fluent, confident, no exception to catch. That’s a silent failure, not a limit you’ll notice by watching for errors. Check what your specific provider or proxy actually does at the limit, and if it truncates, treat “did this turn’s context get cut” as something you monitor for directly, not something you’d otherwise notice happening.