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
Context auto-compression seems ineffective with GLM-5: Request exceeds maximum context length #15556
I am using opencode with the GLM-5 model. According to the features/documentation, opencode should support automatic context compression/summarization when the conversation history or input size grows large.
However, I encountered an API error indicating that the input token count exceeds the model's limit, suggesting that the auto-compression mechanism either did not trigger or failed to reduce the context sufficiently.
Plugins
No response
OpenCode version
1.1.15
Steps to reproduce
Initialize opencode with the GLM-5 model configuration.
Start a long-running conversation session (e.g., iterating on a large codebase or analyzing multiple files).
Monitor the context usage until it reaches approximately 170,000 tokens.
At this stage, trigger an action that requires tool usage (e.g., file edit, search) or subagent invocation.
Observe the API error: Request ... input tokens exceeds the model's maximum context length.
If your issue is distinct (e.g., specific to the GLM-5 model or a different failure mode), please add details clarifying how it differs from the above.
Activity
github-actions commentedon Mar 1, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (e.g., specific to the GLM-5 model or a different failure mode), please add details clarifying how it differs from the above.
fix: disable thinking/reasoning during compaction summarization
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.