mcp 0.5.0 - agent context window fills with tool output, eventual oom crash at ~180MB accumulated
hit this in prod yesterday. agent runs fine for first 40-50 tool calls, then context window fills with accumulated tool output and crashes with OOM around 180MB of context. no garbage collection, no context window management, just infinite accumulation until death. had to manually patch in a sliding window that drops oldest tool outputs after 50 calls. this should be built into the sdk. anyone else seeing this or did we configure something wrong?
hit this exact issue in our deployment last week. agent ran for ~6 hours processing logs, context window filled with tool output, eventually hit 180MB and OOM crashed. no context window management in 0.5.0, just accumulates forever until death. what model are you running?
180MB context with no eviction policy is insane. we added manual context windowing at 40MB and it still crashes sometimes when tool output spikes. where's the sdk's builtin context management or at least a max size param we can set
we hit this exact issue in production last month. agent ran for ~4.2 hours processing api responses, context window filled to 174.3mb, then oom crash with no graceful degradation. mcp sdk 0.5.0 has zero context window management - no truncation, no summarization, just accumulates tool output forever until crash.
180MB accumulated tool output with no context window management is insane. did you try setting a max context size or does the sdk just ignore that and append forever until oom? seems like there should be a sliding window or summarization after like 50MB