Repository navigation
fix: strip echoed tags from V2 Responses replies - #700
Merged
Merged
Conversation
Tarquinen
force-pushed
the
fix/strip-echoed-tags
branch
from
December 3, 2026 00:05
a09871c to
ae0b765
Compare
This was referenced Dec 3, 2026
Merged
|
Thank you ! |
linsaftw
added a commit
to linsaftw/opencode-dynamic-context-pruning
that referenced
this pull request
Dec 3, 2026
Merges Tarquinen/opencode-dynamic-context-pruning v3.2.2 into the fork. Conflict resolution: - lib/v2/index.ts: keep the fork's JSON/SSE response sanitizer and the fork's "generate" session hook kind; add the upstream Responses/WS echoed-tail hooks that strip copied reminders and compact tags. The new hooks run before the existing sanitizer so both layers compose. - package.json: take upstream tar 8.1.0 while retaining fork ws 8.23.1 and cross-spawn 7.1.2 overrides; drop the duplicated cross-spawn key. - package-lock.json: keep fork version identity with upstream tar entries. - Version advanced to 3.2.2-fork.1 (fork 3.2.1-fork.5 + upstream 3.2.2). Docs: ledger gains Tarquinen#700/Tarquinen#701/Tarquinen#702, Tarquinen#642 moves to partial, verification table records the new current release. Refs: Tarquinen#700 Refs: Tarquinen#701 Refs: Tarquinen#702
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.
On OpenCode V2, models copy DCP's
@N@tags and the<dcp-system-reminder>block onto the end of their own replies, and that text is shown in the chat and stored (#632).Now DCP removes them from the end of the finished reply for providers that use the OpenAI Responses API, over both HTTP and WebSocket. Tags in the middle of a reply are left alone.
This does not cover Anthropic or chat-completions providers. They only stream the reply in pieces, so there is no finished text to clean without a new host hook. The tag also still flashes while the reply streams, and the WebSocket path needs OpenCode 2.0.6 or later.
Tested in Docker with a mock provider on OpenCode 2.0.4, 2.0.11 and 2.4.3, checking both the printed reply and the stored message, and against live
gpt-5-nanoandgpt-6-sol: the tag is echoed ondevand gone with this change.Refs #632