| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…pt detail retention - Add tool_output_max_chars config: controls how much tool output text the compaction model sees. Default 2000, can be raised to e.g. 16000. - Add summary_template config: custom Markdown template replacing the hardcoded template. Lets users tailor sections to their workflow. - Add model config: route compaction to a specific model (e.g. 'anthropic/claude-opus-4') separate from the session model. - Add preserve_recent_tokens_max config: upper bound for tokens kept verbatim from recent turns. Default raised from 8000 to 32000. - Revise compaction system prompt to emphasize preserving exact error messages, file paths, command outputs, identifiers, and user preferences over terse bullets. Closes #25746 Refs #21478, #20246, #16333, #13946
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found no duplicate PRs for PR #29324. The searches returned PR #29324 itself and various other compaction-related PRs, but none are addressing the same specific changes (making compaction limits configurable and improving prompt detail retention through the mechanisms described in this PR). The other compaction-related PRs address different aspects like auto-compact loops, compaction thresholds, cache-aligned compaction, etc., but not the same feature scope as this PR. |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #25746
Related: #21478, #20246, #16333, #13946
Type of change
What does this PR do?
Compaction quality regressed after #23870 — models forget context after compaction, especially in tool-heavy sessions. The root causes were hardcoded limits (2k char tool output truncation, 8k token preserve budget) and a generic system prompt that told the model to prefer "terse bullets" over detail.
Changes:
4 new config options in opencode.json so users can tune compaction to their needs:
Compaction engine reads these config values instead of hardcoded constants. Constants renamed to DEFAULT_* signaling they're fallbacks.
Compaction system prompt rewritten to emphasize preserving exact details (error messages, file paths, identifiers, command outputs, user preferences) over terse bullets.
How did you verify your code works?
Screenshots / recordings
N/A — config + engine change, no UI.
Checklist