Uh oh!
There was an error while loading. Please reload this page.
feat(opencode): trigger compaction earlier and add multi-file read - #9656
feat(opencode): trigger compaction earlier and add multi-file read#9656Skyline-23 wants to merge 2 commits into
Conversation
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
There was a problem hiding this comment.
Pull request overview
This PR introduces two main improvements: triggering auto-compaction earlier to prevent full context overflow, and adding multi-file read capability to the Read tool.
Changes:
- Modified compaction logic to trigger at 90% of usable context instead of 100%
- Extended Read tool to accept either
filePathorfilePathsparameters for single or multi-file operations - Updated Read tool documentation to describe the multi-file capability
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/opencode/src/session/compaction.ts | Adds EARLY_COMPACT_RATIO constant (0.9) to trigger compaction at 90% of usable context |
| packages/opencode/src/tool/read.ts | Refactors Read tool to support both single and multiple file reads through filePath/filePaths parameters |
| packages/opencode/src/tool/read.txt | Documents the new filePaths parameter and multi-file output format |
| packages/opencode/test/tool/read.test.ts | Adds basic test for reading multiple files using filePaths parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Skyline-23
commented
Jan 20, 2026
Updated the PR title to conventional format and added |
eb980e8 to
8c8171bCompare8c8171b to
7d0e799Comparef1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Summary
Testing
bun test test/tool/read.test.tsbun test test/session/compaction.test.tsReferences