Repository navigation
Conversation
Session shell messages reached the provider request verbatim, stranding sessions on context overflow. The model now receives a 50 KiB bounded preview matching the tool-output limit; full output stays in session history.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
1 task done
Author
|
Ported to V2 as #54415 — the V2 runner embeds shell output at a different call site (to-llm-message.ts) with no bound, so the same fix applies there against ToolOutput.MAX_BYTES, with the regression test extended into the existing message suite. Thanks for pointing at the V2 branch. |
lab1207
added a commit
to lab1207/opencode
that referenced
this pull request
Oct 11, 2026
Unbounded shell output reaches the provider request verbatim through history replay and can strand the session on context overflow. Bound the preview to ToolOutput.MAX_BYTES; the full output stays in session history. Ports anomalyco#52198 to the V2 runner, which embeds output at a different call site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #45099
Type of change
What does this PR do?
Session shell messages were interpolated into the provider request with no bound, so one large shell output could blow past context, fail as provider.unknown, and strand the session.
On current master the capture-side names from the issue are gone (tool-output-store.ts now, V2 shell op unimplemented), so the live defect is this interpolation site. The fix caps the model-facing preview at the existing 50 KiB tool-output limit (ToolOutputStore.MAX_BYTES). Full output stays untouched in session history.
How did you verify your code works?
Screenshots / recordings
Not a UI change.
Checklist