Repository navigation
Conversation
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 PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Thanks for picking this up, @lab1207, and for the clear write-up and tests! I think this duplicates #51890, which is still open. It limits the same I'm closing this one so the fix stays in one place. If you think #51890 is missing something, like your background-shell test case, it would help a lot to review, test or comment there. |
What changes for the user
Unbounded shell output no longer reaches the provider request verbatim through history replay. The model-facing preview is bound to the tool-output limit (50 KiB); the full output stays in session history. Ports #52198 to the V2 runner, which embeds shell output at a different call site without a bound.
How it was tested
New regression tests in
packages/core/test/session-runner-message.test.ts(extends the existing file): short output passes through verbatim, output past the limit is cut with a marker and the tail is gone, background shells stay out of context. Run frompackages/core: 31/31 pass. The bound test fails on the pre-fix code.bun typecheckclean for@opencode/core; oxlint clean on both touched files.Could not run: the repo-wide pre-push gate fails on unrelated files at HEAD (app e2e fixtures, ui i18n) and I pushed with
--no-verifyfor that reason; my files are hook-clean. Fullbun run check/e2e left for CI (Windows box; core suite run locally).Checklist
bun run checkscope I could run green (core typecheck, oxlint on touched files, core message tests). Full-repo gate red on unrelated files at HEAD, disclosed above..changesetchanges).dev.