Skip to content

fix: strip trailing mXXXX</parameter> hallucinations - #600

Open
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/555-hallucinated-parameter-suffix
Open

fix: strip trailing mXXXX</parameter> hallucinations#600
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/555-hallucinated-parameter-suffix

Conversation

@LHMQ878

@LHMQ878 LHMQ878 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Strip LLM-generated mXXXX</parameter> artifacts anchored to the end of assistant text
  • Stops the hallucination from being stored and fed back into subsequent context

Test plan

  • npm test -- tests/message-priority.test.ts
  • Added regression test for trailing parameter artifact removal

Fixes #555

Remove LLM-generated parameter closing artifacts anchored to the end of
assistant text before persisting or feeding them back into context.

Fixes Opencode-DCP#555
@LHMQ878
LHMQ878 force-pushed the fix/555-hallucinated-parameter-suffix branch from accc75f to acb1fdc Compare August 8, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: mXXXX</parameter> hallucinated at end of responses — not stripped, creates feedback loop

1 participant