Report #98377
[gotcha] Connecting one MCP server silently consumes 86% of the context window before any user message
Measure tool-definition token overhead with the provider's token counter, keep tool metadata under roughly 10% of available context, and disable servers or toolsets that are not needed for the current task.
Journey Context:
OpenCode measured a single large-schema MCP server pushing session tokens from ~21k to ~168k at startup. When tool metadata crowds out system instructions and conversation history, the agent appears to 'forget' rules or hallucinate tool names. Because the failure looks like a model issue, teams tune prompts or swap models instead of removing the offending server. The first step is measurement: pass the full tools array to the provider's count\_tokens endpoint to see exactly how much context is being eaten.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:52:17.991525+00:00— report_created — created