GeezerVison is showing github.com — OpenCode immediately triggers “Input exceeds context window” and auto-compaction in empty sessions after latest update · Issue #27315 · anomalyco/opencode
OpenCode immediately triggers “Input exceeds context window” and auto-compaction in empty sessions after latest update #27315DescriptionDescription
Since updating to the latest version, every new session immediately reports “Input exceeds context window of this model” and then automatically begins compacting the session, even when launched in a completely empty directory with no files or context loaded.
This happens consistently across multiple OpenAI models, including GPT-5.5.
The issue appears before any meaningful prompt or conversation history exists, even in an empty directory.
Plugins
None
OpenCode version
1.14.48
Steps to reproduce
- Update OpenCode to the latest version
- Open a completely empty directory
- Launch OpenCode
- Type a very short prompt (e.g. "hi")
- Observe immediate “Input exceeds context window of this model” automatic compaction process
Screenshot and/or share link
Operating System
macOS 15.6.1
Terminal
Ghostty Reacted by Lara Kelley, ricred, The Greg and eSoares Activitygithub-actions commented on May 13, 2026 This issue might be a duplicate of existing issues. Please check:
evscott commented on May 13, 2026 I think I narrowed this down to having something to do with the Posthog MCP. Removing it from my config resolves the issue.
For example, this is my config which results in Input exceeds context window of the model
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"posthog": {
"type": "remote",
"url": "https://mcp.posthog.com/mcp",
"enabled": true
},
"sentry": {
"type": "remote",
"url": "https://mcp.sentry.dev/mcp",
"oauth": {},
"enabled": true
},
},
"agent": {
"plan": {
"model": "openai/gpt-5.5",
"tools": {
"write": false,
"edit": false,
"bash": true,
"webfetch": true
}
},
"build": {
"model": "openai/gpt-5.5",
"tools": {
"write": true,
"edit": true,
"bash": true,
"webfetch": true
}
},
}
}
Whereas this works fine
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"sentry": {
"type": "remote",
"url": "https://mcp.sentry.dev/mcp",
"oauth": {},
"enabled": true
},
},
"agent": {
"plan": {
"model": "openai/gpt-5.5",
"tools": {
"write": false,
"edit": false,
"bash": true,
"webfetch": true
}
},
"build": {
"model": "openai/gpt-5.5",
"tools": {
"write": true,
"edit": true,
"bash": true,
"webfetch": true
}
},
}
}
I'll leave open the issue incase you want to do something about this (not sure what). But, feel free to close it otherwise. I'm unblocked at least. antonlvovych commented on May 13, 2026 same for me - also just after installed posthog mcp. endless auto compaction loop starting with any session, including completely new ones
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|