Skip to content

[Bug]: Nudge text and message ID tags render visibly in UI at end of assistant messages #608

Description

@brdcastro

Description

In automatic mode (manualMode.enabled: false), the plugin appends the compress nudge (wrapped in <dcp-system-reminder>) and the message ID tag (<dcp-message-id>m00XX</dcp-message-id>) directly into the assistant message's text part. The OpenCode UI strips the XML tags but renders the inner text, so the user sees the raw nudge prompt + a bare m00XX id at the end of the assistant reply.

This is visible in the chat UI (not just in the raw message data), which makes it look like model output corruption.

Steps to reproduce

  1. manualMode.enabled: false (default), nudgeForce: "soft".
  2. Let a session grow past minContextLimit (e.g. 50k tokens).
  3. Observe the end of assistant messages: nudge text ("Compressed block context…") + m00XX id are rendered as visible text.

Expected

Nudge / message-id injections are model-facing metadata. They should not be rendered as visible assistant text in the UI (either the UI strips dcp-* tags, or the plugin marks those parts as non-renderable).

Workaround

manualMode.enabled: true stops the nudge injection, but compression then requires manual /dcp-compress. The m00XX id tags are still injected (injectMessageIds is not gated by manualMode), so a bare id can still appear.

Environment

  • Plugin: 3.1.14 (also present in 3.1.15 — injection logic unchanged)
  • OpenCode: 1.18.18
  • OS: macOS (darwin)

Related: #562 (angle brackets at end of message), #506 (manual mode stops reminder — closed/implemented).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions