Skip to content

fix(auto-reply): keep explicit NO_REPLY silent - #116548

Merged
fuller-stack-dev merged 3 commits into
mainfrom
sjf/no-reply-is-not-empty
Jul 30, 2026
Merged

fuller-stack-dev merged 3 commits into
mainfrom
sjf/no-reply-is-not-empty

Conversation

@sjf-oa

@sjf-oa sjf-oa commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users addressing an agent could receive a generic no-visible-reply failure message when the model explicitly returned NO_REPLY.

NO_REPLY is a non-empty control response. OpenClaw intentionally removes it before transport, but finalization could then mistake the lack of visible delivery for a genuinely empty model completion.

Why This Change Was Made

Preserve the canonical deliberate-terminal-silence classification when deciding whether the no-visible-reply fallback is allowed. The existing hasDeliberateSilentTerminalReply classifier owns this fact from the raw/visible agent result and also covers hook_block; the dispatcher now carries that fact forward instead of re-deriving it from filtered reply payloads.

This is deliberately narrower than allowing arbitrary empty output to stay silent: an absent or empty completion still receives the fallback when the turn is otherwise eligible. A sibling NO_REPLY payload without canonical terminal-silence classification also cannot suppress recovery.

The change is in shared core auto-reply dispatch, not a Discord, Slack, or other transport adapter, so it applies to every channel using the common path.

The upstream Codex app-server carries agent-message text through unchanged when it converts a completed turn item (agent-message conversion) and emits the converted item in item/completed (notification mapping). The silent-token interpretation therefore belongs in OpenClaw.

User Impact

An intentional terminal NO_REPLY remains silent everywhere. Truly empty directed completions continue to surface the existing fallback message.

Screenshot 2026-07-30 at 13 20 15-redacted-v3

Evidence

  • Real agent-run result coverage proves NO_REPLY invokes the canonical internal silence signal before payload projection.
  • Direct and mentioned-group dispatch regressions prove the carried signal produces no delivery and no fallback eligibility.
  • A negative control proves a sibling NO_REPLY payload alone does not suppress recovery after a visible final is cancelled.
  • The adjacent genuinely empty directed-turn regression continues to require the fallback.
  • Focused Testbox proof on a synthetic merge with current upstream/main 43156fe482f (including fix(outbound): recognize current-source message-tool sends #116560): 407/407 tests passed across dispatch, agent runner, and the result fallback classifier (run).
  • pnpm check:changed passed the core/coreTests typecheck, lint, formatting, boundary, dead-code, and repository guard lanes.
  • Targeted formatting, git diff --check, and fresh autoreview passed; autoreview reported no accepted/actionable findings.

Relationship to #116560

#116560 and this PR are complementary. #116560 repairs channel-agnostic message-tool delivery accounting; this PR repairs channel-agnostic deliberate-silence policy. The combined-main proof above exercises both together.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 30, 2026
@sjf-oa sjf-oa changed the title fix(auto-reply): keep NO_REPLY silent in directed turns fix(auto-reply): keep explicit NO_REPLY silent Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 6:55 PM ET / 22:55 UTC.

ClawSweeper review

What this changes

This PR carries OpenClaw’s canonical deliberate-terminal-silence result from the agent runner into shared auto-reply finalization so an explicit NO_REPLY does not trigger the generic no-visible-reply fallback.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 4 items remain

Keep this PR open for maintainer review. The follow-up commit addresses the earlier ownership concern by carrying the existing deliberate-silence fact into dispatch rather than reclassifying filtered payloads, but the available evidence is still test/CI-oriented and the documented failed-send-plus-NO_REPLY edge case needs an explicit maintainer scope decision before merge.

Priority: P2
Reviewed head: fb88a28b1d42b277291ad58fa9f9d2138aa0e5c6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The ownership correction and focused regression coverage are solid, but uninspectable screenshot evidence and test-only validation leave the real-behavior merge gate unmet.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The screenshot attachment was not available as inspectable evidence in the supplied context, while the remaining stated proof is focused tests and CI; add a redacted runtime transcript, terminal output, recording, or diagnostic logs that show the after-fix dispatch result. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The screenshot attachment was not available as inspectable evidence in the supplied context, while the remaining stated proof is focused tests and CI; add a redacted runtime transcript, terminal output, recording, or diagnostic logs that show the after-fix dispatch result. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Canonical classification is carried forward: The branch computes deliberate terminal silence once from the agent-run result, signals it through an internal callback, stores it in prepared dispatch state, and consumes it when deciding whether the no-visible-reply fallback is eligible.
Fallback gate uses the prepared result fact: The changed finalizer blocks the fallback when the carried deliberate-silence flag is true rather than inspecting projected reply payloads, matching the ownership correction requested in the review discussion.
Prior review feedback was addressed: The July 30, 2026 follow-up comment states that the single existing classifier remains authoritative, replies are no longer scanned for NO_REPLY, and the direct/group tests now exercise propagated state rather than injected payload text.
Findings None None.
Security None None.

How this fits together

Shared auto-reply dispatch receives an agent-run result, projects reply payloads for channel delivery, then finalizes the turn and may send a fallback notice when nothing visible was delivered. This change preserves the runner’s deliberate-silence decision through that pipeline so finalization can distinguish intentional silence from an empty completion.

flowchart LR
  A[Incoming directed message] --> B[Agent runner]
  B --> C[Deliberate-silence classifier]
  B --> D[Reply payload projection]
  C --> E[Prepared dispatch state]
  D --> F[Channel delivery accounting]
  E --> G[Dispatch finalization]
  F --> G
  G --> H[Silent completion or fallback notice]
Loading

Decision needed

Question Recommendation
Should a terminal NO_REPLY suppress the no-visible-reply fallback even when the same turn attempted a source send that failed? Require a failed-send exception: Preserve intentional silent completions but keep recovery eligible when authoritative delivery accounting records a failed source send.

Why: The PR deliberately carries a semantic silence classification into a shared delivery fallback, while the discussion identifies failed instructed sends as a narrow exception where silence may hide an unsuccessful user-visible action.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The screenshot attachment was not available as inspectable evidence in the supplied context, while the remaining stated proof is focused tests and CI; add a redacted runtime transcript, terminal output, recording, or diagnostic logs that show the after-fix dispatch result. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P2) - A directed turn that attempted a send, received a failed tool result, and then ended with NO_REPLY would also suppress the generic no-visible-reply fallback under this gate. The discussion identifies that shape as intentionally deferred, so a maintainer should explicitly accept the scope or require a delivery-failure exception before merge.
  • Resolve merge risk (P2) - The PR changes shared channel-agnostic fallback behavior; tests cover prepared-state propagation, but the available evidence does not independently show an after-fix runtime turn on a configured channel or equivalent live dispatch path.
Agent review details

Security

None.

PR surface

Source +95, Tests +11. Total +106 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 6 100 5 +95
Tests 1 12 1 +11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 112 6 +106

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Prove and decide failed-send behavior (recommended)
    Before merge, show a redacted runtime case for deliberate silence and decide whether failed current-source sends must remain fallback-eligible.
  2. Land the narrow semantic rule
    Accept that canonical terminal silence wins over the generic fallback in this PR, with an explicit follow-up for failed instructed sends.

Technical review

Best possible solution:

Keep the existing single result classifier and merge only after maintainers decide the failed-send terminal-silence policy and the contributor supplies redacted after-fix runtime evidence showing intentional silence with the ordinary empty-completion fallback still observable.

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

No high-confidence live reproduction was available in the supplied evidence. The changed source path and focused regressions make the fallback classification source-reproducible, but they do not independently demonstrate the configured after-fix runtime behavior.

Is this the best way to solve the issue?

Yes for the ownership correction: carrying the existing agent-result classifier is narrower and safer than deriving a second silence fact from filtered reply payloads. It remains unclear whether that rule should override recovery after a known failed send, which needs maintainer policy confirmation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 43156fe482f3.

Labels

Label justifications:

  • P2: This is a bounded shared auto-reply behavior correction with channel-wide but non-emergency impact.
  • merge-risk: 🚨 message-delivery: The finalization gate can intentionally suppress a user-visible recovery notice across all channel dispatch paths.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The screenshot attachment was not available as inspectable evidence in the supplied context, while the remaining stated proof is focused tests and CI; add a redacted runtime transcript, terminal output, recording, or diagnostic logs that show the after-fix dispatch result. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The screenshot attachment was not available as inspectable evidence in the supplied context, while the remaining stated proof is focused tests and CI; add a redacted runtime transcript, terminal output, recording, or diagnostic logs that show the after-fix dispatch result.

Evidence

What I checked:

  • Canonical classification is carried forward: The branch computes deliberate terminal silence once from the agent-run result, signals it through an internal callback, stores it in prepared dispatch state, and consumes it when deciding whether the no-visible-reply fallback is eligible. (src/auto-reply/reply/agent-runner-result-payloads.ts:97, fb88a28b1d42)
  • Fallback gate uses the prepared result fact: The changed finalizer blocks the fallback when the carried deliberate-silence flag is true rather than inspecting projected reply payloads, matching the ownership correction requested in the review discussion. (src/auto-reply/reply/dispatch-from-config.finalize.ts:292, fb88a28b1d42)
  • Prior review feedback was addressed: The July 30, 2026 follow-up comment states that the single existing classifier remains authoritative, replies are no longer scanned for NO_REPLY, and the direct/group tests now exercise propagated state rather than injected payload text. (fb88a28b1d42)
  • Complementary merged delivery-accounting work: fix(outbound): recognize current-source message-tool sends #116560 merged on July 30, 2026 and records successful current-source message-tool delivery; its stated scope is distinct from this PR’s deliberate-silence classification. (dc34274397f9)
  • Proof remains insufficient for the external-PR gate: The PR body reports focused tests, changed checks, and a screenshot attachment, but the supplied review context does not provide inspectable after-fix runtime output or a retrievable screenshot showing the actual configured delivery path. Tests and CI are supplemental rather than real-behavior proof. (fb88a28b1d42)

Likely related people:

  • fuller-stack-dev: Authored the follow-up ownership correction on this branch and the adjacent merged delivery-accounting repair for the same finalization surface. (role: recent area contributor; confidence: medium; commits: fb88a28b1d42, dc34274397f9; files: src/auto-reply/reply/dispatch-from-config.execute.ts, src/auto-reply/reply/dispatch-from-config.finalize.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted after-fix runtime evidence showing explicit NO_REPLY stays silent on a configured dispatch path.
  • Show or document the intended result when a source send fails before terminal NO_REPLY, then update the PR body; a fresh ClawSweeper review should trigger automatically, or a maintainer can comment @clawsweeper re-review if it does not.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-07-30T20:17:03.072Z sha 1d8de39 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-30T21:32:40.678Z sha 1d8de39 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Jul 30, 2026
@sjf-oa
sjf-oa requested a review from obviyus July 30, 2026 22:06
@obviyus

obviyus commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the ping. I agree with the gate: an explicit NO_REPLY is the model reporting that it finished, so counting it as a failed turn is wrong. The rest of the codebase already works this way. buildEmptyInteractiveReplyPayload skips its sibling notice on the same fact (src/auto-reply/reply/agent-runner-failure-reply.ts:508), so the dispatch notice was the outlier.

One change I would like before merge. That fact already exists as hasDeliberateSilentTerminalReply (src/agents/embedded-agent-runner/result-fallback-classifier.ts:75), which also covers hook_block and reads both finalAssistantRawText and finalAssistantVisibleText. This PR adds a second version under the same name, derived from replies one layer down. Could you carry the existing value into the dispatch state instead? Two derivations of one fact tend to drift, and the new test injects a resolver returning the token directly, so it does not yet show that a real run still carries it in replies at finalize.

One case I would leave for a follow-up rather than this PR: a turn that was instructed to send, whose send fails, and which returns NO_REPLY anyway. The gate suppresses the notice and the user sees nothing. It is narrow, since the model does get the failed tool result back, but it is the one shape where the token is not proof the work landed.

Agreed on #116560 being complementary rather than a substitute, and thanks for the app-server references.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Addressed in fb88a28b1d4—thanks, this was the right ownership correction.

  • hasDeliberateSilentTerminalReply(runResult) remains the single classifier, including raw/visible text and hook_block.
  • The agent-result path now signals that canonical fact through an internal callback; dispatch carries the boolean in prepared state and finalization consumes it.
  • Finalization no longer scans replies for NO_REPLY.
  • The direct/mentioned-group tests now exercise the carried fact instead of injecting the token as a returned payload.
  • Added real agent-run propagation coverage plus a negative control showing a sibling NO_REPLY payload cannot suppress recovery.

Focused proof is green, including a synthetic merge with current main and #116560: 407/407 tests passed (Testbox run); changed-lane typecheck/lint/format/guards and fresh autoreview also passed.

I left the failed instructed-send + terminal NO_REPLY case out of this PR as suggested and called it out as follow-up scope.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Pre-merge scope/proof decision:

  • The failed instructed-send + terminal NO_REPLY case stays out of this PR. obviyus explicitly identified it as a narrow follow-up rather than a blocker, and this repair preserves the existing semantic-silence contract without inventing new delivery-failure policy.
  • I am accepting the shared-dispatch runtime harness plus exact combined-main Testbox proof for this channel-agnostic owner boundary. The repaired head covers direct and directed-group silence, the ordinary empty-completion fallback, real run-result propagation, and the sibling-payload negative control; the synthetic merge with current main and fix(outbound): recognize current-source message-tool sends #116560 passed 407/407 focused tests. A credentialed third-party-channel run would test an adapter that this PR does not change and would not add owner-boundary coverage.

This records the two optional review suggestions explicitly rather than merging past them silently.

@fuller-stack-dev
fuller-stack-dev merged commit 138be7f into main Jul 30, 2026
126 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the sjf/no-reply-is-not-empty branch July 30, 2026 23:04
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 31, 2026
…-supported-paths

* origin/main: (168 commits)
  fix(plugins): keep registry sqlite root consistent (#116427)
  fix(cli): keep Gateway auth failures parseable in JSON (#116597)
  fix(trajectory): preserve prompts in oversized events (#116220)
  test(buzz): add live QA Lab channel lane (#116298)
  chore(i18n): refresh native locales (#116567)
  feat: add OpenClaw TUI prototype skill (#116583)
  fix(update): accept concrete versions selected by ranges (#116585)
  fix(agents): preserve locked session model routes
  test(qa-lab): preserve Matrix fault proxy identity
  fix(ci): extend OpenAI live profile setup budget (#116580)
  fix: prevent configured models from stalling startup (#116553)
  fix(cli): close MCP listener after one-shot commands
  fix(auto-reply): keep explicit NO_REPLY silent (#116548)
  test(discord): cover deferred backpressure terminals
  fix(discord): cancel backpressured realtime playback
  test(discord): cover realtime output backpressure
  fix(codex): add remote WebSocket heartbeat and reconnect (#116135)
  fix(macos): wait for the current reconnect snapshot (#116550)
  fix(outbound): recognize current-source message-tool sends (#116560)
  fix(voice-call): type cancelled consult outcomes
  ...

# Conflicts:
#	extensions/google/setup-api.test.ts
#	ui/src/e2e/model-setup.e2e.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
* fix(auto-reply): keep NO_REPLY silent

* test(auto-reply): cover NO_REPLY across directed turns

* fix(auto-reply): carry deliberate silence into dispatch

---------

Co-authored-by: Sarah Fortune <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
…-supported-paths

* origin/main: (168 commits)
  fix(plugins): keep registry sqlite root consistent (openclaw#116427)
  fix(cli): keep Gateway auth failures parseable in JSON (openclaw#116597)
  fix(trajectory): preserve prompts in oversized events (openclaw#116220)
  test(buzz): add live QA Lab channel lane (openclaw#116298)
  chore(i18n): refresh native locales (openclaw#116567)
  feat: add OpenClaw TUI prototype skill (openclaw#116583)
  fix(update): accept concrete versions selected by ranges (openclaw#116585)
  fix(agents): preserve locked session model routes
  test(qa-lab): preserve Matrix fault proxy identity
  fix(ci): extend OpenAI live profile setup budget (openclaw#116580)
  fix: prevent configured models from stalling startup (openclaw#116553)
  fix(cli): close MCP listener after one-shot commands
  fix(auto-reply): keep explicit NO_REPLY silent (openclaw#116548)
  test(discord): cover deferred backpressure terminals
  fix(discord): cancel backpressured realtime playback
  test(discord): cover realtime output backpressure
  fix(codex): add remote WebSocket heartbeat and reconnect (openclaw#116135)
  fix(macos): wait for the current reconnect snapshot (openclaw#116550)
  fix(outbound): recognize current-source message-tool sends (openclaw#116560)
  fix(voice-call): type cancelled consult outcomes
  ...

# Conflicts:
#	extensions/google/setup-api.test.ts
#	ui/src/e2e/model-setup.e2e.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants