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
Auto Compact Failed when recovery compaction request is also over context limit (WSL + Claude Opus 4.6 via CLIProxyAPI) #15849
All recovery attempts failed. Please start a new session.
Even though auto-compaction is enabled, the session exits instead of recovering.
In my logs, the original request is over the model limit, and then the recovery compaction request is also over the same limit, so compaction cannot succeed.
Environment
OpenCode: 1.2.15
OS: WSL2 Ubuntu 24.04 on Windows 11
Terminal: Windows Terminal + tmux
Model: claude-opus-4-6
Provider path: OpenCode -> CLIProxyAPI (/v1/chat/completions) -> Claude
CLIProxyAPI: v6.8.39
Steps to reproduce
Start a long OpenCode session with heavy agent/tool output.
Keep iterating until context gets large.
Send another request.
Observe OpenCode attempting auto compact, then failing with Auto Compact Failed and asking to start a new session.
Actual behavior
The request fails with prompt is too long, and automatic recovery compaction also fails because the compaction request itself is still too large.
Expected behavior
When compaction recovery would also exceed context window, OpenCode should still recover gracefully (e.g. harder pruning / partial-summary fallback / enforced handoff), instead of ending in unrecoverable state.
Activity
github-actions commentedon Mar 3, 2026
This issue might be a duplicate of existing issues. Please check:
You may also want to follow #10634 and #10220 which you already referenced, as fixes there could address this as well.
github-actions commentedon May 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.