Skip to content

Feature: post-process NO_REPLY to suppress partial leaks #42472

Closed as not planned
BingqingLyu/openclaw
#429

Description

@the3asic

Problem

When the model outputs text followed by NO_REPLY (e.g. "summary of work done...NO_REPLY"), the text before NO_REPLY leaks to the user as a visible message. This violates the intended behavior where NO_REPLY should suppress the entire reply.

This is especially common with weaker models (e.g. GLM-5) running heartbeat tasks, which tend to output internal summaries before appending NO_REPLY rather than outputting it as the sole content.

Current behavior

  • Model outputs: "All tasks completed:\n• infra: 0 alerts\n• gmail: 0 new\nNO_REPLY"
  • User sees: the summary text (NO_REPLY is stripped but the preceding text is delivered)

Expected behavior

If a model response contains NO_REPLY (or ends with it), the entire message should be suppressed — not just the NO_REPLY token itself.

Suggested implementation

Post-processing rule in the reply pipeline: if the raw model output matches /NO_REPLY/ (or perhaps /(^|\n)\s*NO_REPLY\s*$/), treat the entire response as a silent ack, same as a clean NO_REPLY.

This would make the NO_REPLY contract robust against models that prepend reasoning/summaries before the suppression token.

Context

  • Heartbeat tasks with zhipu-cn-coding/glm-5 frequently trigger this
  • The HEARTBEAT.md and AGENTS.md already instruct the model to output only NO_REPLY, but instruction-following varies by model
  • A gateway-level guard would be more reliable than prompt-level enforcement

Activity

  1. openclaw-barnacle commented on Apr 27, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  2. added
    stale
    on Apr 27, 2026
  3. clawsweeper commented on Apr 27, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 30, 2026, 11:32 PM ET / July 31, 2026, 03:32 UTC.

    Summary
    Keep open. The report identifies a plausible internal-text leak, but the requested “contains NO_REPLY” rule would reverse an established behavior that strips a trailing token and delivers substantive text; the appropriate silent-reply boundary needs maintainer product and security judgment. An open implementation candidate is already linked, so a parallel repair should not be dispatched.

    Reproducibility: unclear. for current main. Related proposals provide a concrete source-level path—mixed text followed by a terminal NO_REPLY reaches normalization—but the read-only sandbox prevented fresh current-main execution or line-level verification.

    Root-cause cluster
    Relationship: canonical
    Canonical: #42472
    Summary: This is the canonical repository issue for the duplicated report; the remaining proposed implementation is an open external fork candidate rather than a merged same-repository fix.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Share version, platform, channel/provider, and relevant config details.

    Maintainer decision needed

    Question Recommendation
    Should a terminal NO_REPLY on its own line suppress the entire final response, while inline trailing NO_REPLY continues to be stripped and the substantive text delivered? Adopt terminal own-line suppression: Treat a terminal NO_REPLY occupying its own line as a silent outcome, while retaining current inline trailing-token stripping behavior.

    Why: The current reported leak conflicts with an established mixed-content delivery contract, so selecting the suppression boundary determines both user-visible messaging and potential internal-text exposure.

    Next step
    A linked open implementation candidate exists, but maintainers must choose the silent-reply compatibility and security boundary before a single repair path is safe.

    Security
    Needs attention: The issue changes the boundary between suppressing potentially internal model text and silently dropping potentially meaningful replies, so the final grammar needs security-aware maintainer review.

    Review details

    Best possible solution:

    Define and test one explicit silent-reply grammar—preferably terminal token-only or terminal own-line handling that preserves deliberate inline text—then implement it at the shared reply boundary and prove both final and streaming delivery behavior.

    Do we have a high-confidence way to reproduce the issue?

    Unclear for current main. Related proposals provide a concrete source-level path—mixed text followed by a terminal NO_REPLY reaches normalization—but the read-only sandbox prevented fresh current-main execution or line-level verification.

    Is this the best way to solve the issue?

    No—not as written. A blanket contains-based rule is broader than the established mixed-content behavior; a terminal own-line boundary or a structured silent outcome is the safer maintainable direction.

    AGENTS.md: unclear because the file could not be read completely.

    Remaining risk / open question:

    • Suppressing every response that merely contains or ends with NO_REPLY can silently discard a substantive reply that current behavior intentionally delivers after removing the token.
    • The proposed post-processing rule cannot retract text already emitted by streaming delivery; its correct boundary must be evaluated across final and streaming delivery paths.

    Codex review notes: model internal, reasoning high; reviewed against 5337e85f111a.

    Label changes

    Label justifications:

    • P2: This is a bounded but user-visible reply-delivery concern whose safe behavior boundary remains unresolved.
    • impact:security: The reported failure can expose model-generated internal status or reasoning text that the silent token was meant to withhold.
    • impact:message-loss: The requested change changes whether mixed replies are intentionally delivered or suppressed on channel paths.
    Evidence reviewed

    Security concerns:

    • [medium] Choose a narrow silent-reply boundary
      A contains-based rule may suppress meaningful user-facing text, while an overly narrow rule can expose internal text; select and test an explicit terminal-token contract across delivery paths.
      Confidence: 0.85

    What I checked:

    Likely related people:

    • SunnyShu0925: Authored merged PR fix(auto-reply): strip stray punctuation before silent-reply token detection #98224, which most recently hardened token-only silent-reply recognition in the central token helper. (role: recent area contributor; confidence: medium; commits: 19d621e760be; files: src/auto-reply/tokens.ts, src/auto-reply/tokens.test.ts)
    • caiop91: Authored the related own-line suppression proposals that mapped normalization and downstream delivery paths, making them a useful technical context holder if maintainers choose that boundary. (role: prior multi-path proposal author; confidence: low; commits: 076a1754e8f0, cc3ee61992c7; files: src/auto-reply/tokens.ts, src/auto-reply/reply/normalize-reply.ts, src/auto-reply/reply/reply-directives.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  4. removed
    stale
    on Apr 28, 2026
  5. added
    P2
    clawsweeper:source-repro
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    clawsweeper:fix-shape-clear
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    clawsweeper:needs-security-review
    impact:security
    impact:message-loss
    issue-rating: 🦞 diamond lobster
    on May 16, 2026
  6. 31 remaining items

  7. removed
    clawsweeper:fix-shape-clear
    on Jul 8, 2026
  8. added
    issue-rating: 🦪 silver shellfish
    clawsweeper:needs-info
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    clawsweeper:needs-maintainer-review
    and removed
    clawsweeper:needs-maintainer-review
    clawsweeper:source-repro
    issue-rating: 🦞 diamond lobster
    clawsweeper:needs-info
    issue-rating: 🦪 silver shellfish
    on Jul 31, 2026
  9. openclaw-barnacle commented on Aug 15, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  10. added
    stale
    on Aug 15, 2026
  11. openclaw-barnacle commented on Aug 22, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:linked-pr-openclawsweeper:needs-live-reproclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:needs-security-reviewclawsweeper:no-new-fix-primpact:message-lossimpact:securityissue-rating: 🐚 platinum hermitstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions