[PR #12419] Fix apply on Compressing Chat don t work properly well after so many … #14207

Open
opened 2026-02-16 18:19:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12419

State: open
Merged: No


…Updates from OpenCode #12380

Add optional compaction.window.head config to send only the last N messages to the model instead of the full history. This avoids context/cache overflow and the "stuck without compressing" behavior when editing many files (e.g. 20+ HTML/CSS pages) or when compaction fails to run.

Fixes issue where assistant gets stuck in thinking/retry loop when manually patching large codebases without successfully compressing the context window.

What does this PR do?

Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12419 **State:** open **Merged:** No --- …Updates from OpenCode #12380 Add optional compaction.window.head config to send only the last N messages to the model instead of the full history. This avoids context/cache overflow and the "stuck without compressing" behavior when editing many files (e.g. 20+ HTML/CSS pages) or when compaction fails to run. Fixes issue where assistant gets stuck in thinking/retry loop when manually patching large codebases without successfully compressing the context window. ### What does this PR do? Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr. **If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!** ### How did you verify your code works?
yindo added the pull-request label 2026-02-16 18:19:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14207