You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Un-controllable Token Exceed with MCP results #648
I can confirm. This happens with html_get use with a browser mcp (playwright) as well. A large html dump will take the context over 1M sometimes and then the session is borked.
Adding to this: my own workflow first compacts fine, then the subsequent compaction runs try to reuse the full context from before compaction. This leads to a silly situation in which a session tries to compact a million-tokens worth of conversation from a 128k window: Condensing API call failed: OpenAI completion error: 400 request (1009019 tokens) exceeds the available context size (128000 tokens), try increasing it (Yes, somehow this is still working out fine for my purpose, despite the context window crops.)
This didn't come from a massive MCP call result filling the context window, just normal usage. This may be another bug I could describe as "the compaction algorithm keeps reusing the full conversation instead of previous compaction results."
Activity
pajitosingh commentedon Jun 18, 2026
I can confirm. This happens with html_get use with a browser mcp (playwright) as well. A large html dump will take the context over 1M sometimes and then the session is borked.
Awilen-Bernkastel commentedon Sep 14, 2026
Adding to this: my own workflow first compacts fine, then the subsequent compaction runs try to reuse the full context from before compaction. This leads to a silly situation in which a session tries to compact a million-tokens worth of conversation from a 128k window:
Condensing API call failed: OpenAI completion error: 400 request (1009019 tokens) exceeds the available context size (128000 tokens), try increasing it(Yes, somehow this is still working out fine for my purpose, despite the context window crops.)This didn't come from a massive MCP call result filling the context window, just normal usage. This may be another bug I could describe as "the compaction algorithm keeps reusing the full conversation instead of previous compaction results."