Skip to content

fix(agents): Don't show an error message if the agent returns NO_REPLY - #149642

Merged
sjf-oa merged 2 commits into
mainfrom
sjf/claw-2-honor-explicit-no-reply
Sep 16, 2026
Merged

sjf-oa merged 2 commits into
mainfrom
sjf/claw-2-honor-explicit-no-reply

Conversation

@sjf-oa

@sjf-oa sjf-oa commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

A directed chat turn can successfully add a reaction and deliberately finish with NO_REPLY. When empty replies are disallowed, the runner currently treats that authored silence as a missing final answer and may post an unwanted summary-recovery fallback.

Examples and exact diagnostics

Case What happens before this fix Expected result
Observed Slack acknowledgment A user says Passed ✅. The agent successfully adds a reaction and ends with NO_REPLY, but OpenClaw posts the fallback text below. Keep the reaction and send no text reply.
Directed-turn regression, empty replies disabled or unspecified A successful message(action=react) result followed by NO_REPLY reaches missing-summary recovery even with no finalization context available. Preserve the authored silence without attempting finalization.
Optional-finalizer regression An optional finalizer returns NO_REPLY with allowEmptyAssistantReplyAsSilent: false. The old policy retries the finalizer and can emit the same fallback. Accept the explicit silence after one finalizer call and produce no payload.

Exact unwanted message visible in Slack:

The tool run finished, but no final summary was produced. I did not repeat any completed actions.

The observed Gateway finalization failure contains this exact error:

Codex settled-turn finalization context is unavailable

The Gateway warning ends with:

error=Codex settled-turn finalization context is unavailable — using terminal fallback reply

The original successful turn had deliberately produced NO_REPLY; attempting summary recovery caused the diagnostic and visible fallback.

Change

Recognize an explicit silent response independently of the permission to accept genuinely empty output. Keep the existing failure, timeout, cancellation, pending-work, and delivery guards. Update the optional-finalizer regression to reflect the same distinction between authored silence and blank output.

Validation

  • CI run 35158546541 passed on 6a492d2e03aaa53563e3fc25d8efdc00023e5e4a: 139 jobs passed, 17 workflow-selected skips, and the required openclaw/ci-gate is green.
  • Both previously failing test jobs (checks-node-compact-large-8 and checks-node-compact-large-12) and check-lint-core-1 passed on the corrected commit.
  • Focused lint on all four changed files and git diff --check passed locally.
  • ClawSweeper re-review reviewed the same commit and found no remaining actionable findings. Its requested test correction is included; the subsequent repair commit changes tests only.
  • No live gateway rollout was performed.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 6:42 PM ET / 22:42 UTC (Revision 2).

ClawSweeper review

What this changes

The agent runner accepts explicit NO_REPLY responses independently of the empty-reply setting, with updated recovery and finalization regression tests.

Merge readiness

✅ Ready for maintainer review

The previous finding is resolved, and no remaining actionable defect was found. The fix remains necessary: current main and the latest release still reject authored silence when empty replies are disabled.

Priority: P2
Reviewed head: 6a492d2e03aaa53563e3fc25d8efdc00023e5e4a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with corrected regression expectations and no remaining actionable findings; execution results remain with normal CI.
Proof confidence 🌊 off-meta tidepool Not applicable: GitHub verifies the author's maintain role, so contributor-only runtime proof is exempt; the body supplies pre-fix Slack observations and supplemental regression coverage, not an after-fix live run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: GitHub verifies the author's maintain role, so contributor-only runtime proof is exempt; the body supplies pre-fix Slack observations and supplemental regression coverage, not an after-fix live run.
Evidence reviewed 9 items Narrow production change: The complete host-pinned introduced diff changes one production condition. Explicit silence bypasses only the empty-reply permission check; failure, abort, timeout, pending-work, and committed-delivery checks remain.
Previous finding resolved: The optional-finalizer matrix now expects one backend call, an answered classification, and no payload for false and unspecified empty-reply settings. Required replies, blank output, failed tools, and original timeouts retain their controls. The separate error-recovery expectation was also corrected.
Production caller and implementation boundary: Terminal resolution checks the shared silence policy before requesting finalization. This is an OpenClaw-owned decision over prepared attempt facts; the patch does not change a Codex dependency contract. The reported Codex diagnostic identifies an unwanted recovery attempt, rather than establishing dependency-specific behavior that this patch must implement.
Findings None None.
Security None None.

How this fits together

The agent runner turns model output and completed tool results into a final response or recovery attempt. Its silence policy determines whether an intentional acknowledgment stays quiet or triggers an unwanted fallback message.

flowchart TD
  A[Model output and tool results] --> B[Terminal response preparation]
  B --> C[Explicit silence policy]
  C --> D[Failure and pending-work guards]
  D --> E[Preserve intentional silence]
  D --> F[Recovery or visible response]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +68. Total +68 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 3 129 61 +68
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 130 62 +68

Review metrics

None.

Technical review

Best possible solution:

Keep authored silence terminal in the shared recovery owner while retaining failure visibility and the separate rules for genuinely blank output.

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

Yes, from source: a successful reaction followed by NO_REPLY with empty replies disabled reaches the old rejection guard and can enter summary recovery. Runtime reproduction was not performed in this review.

Is this the best way to solve the issue?

Yes. The one-condition repair uses the existing silence owner, matches the documented contract, and preserves the recovery guards; the revised finalizer expectations now agree with that behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 75ba5e3fae5c.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: GitHub verifies the author's maintain role, so contributor-only runtime proof is exempt; the body supplies pre-fix Slack observations and supplemental regression coverage, not an after-fix live run.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This fixes unwanted fallback chatter after successful intentional silence, with a bounded agent-recovery change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: GitHub verifies the author's maintain role, so contributor-only runtime proof is exempt; the body supplies pre-fix Slack observations and supplemental regression coverage, not an after-fix live run.

Evidence

What I checked:

Likely related people:

  • leilei3167: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • PollyBot13: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-09-16T04:07:52.340Z sha 4ad86cc :: needs changes before merge. :: [P2] Update the finalizer's disabled-empty-reply expectation

sjf-oa pushed a commit that referenced this pull request Sep 16, 2026
Backport-Of: #149642
Release-Target: sjf_openclaw_2026-09-04

Source-Commit: 4ad86cc
@sjf-oa

sjf-oa commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the optional-finalizer finding in 6a492d2e03aaa53563e3fc25d8efdc00023e5e4a: explicit NO_REPLY now has the expected one-call silent result when the empty-reply setting is false or unspecified. The required-reply, blank-output, tool-failure, and timeout controls remain intact.

The same commit corrects the second stale expectation in run.incomplete-turn.error-recovery.test.ts and removes the test-matrix spread flagged by oxc(no-map-spread). These are test-only changes; production behavior is unchanged from the reviewed patch. The PR description now includes the observed acknowledgment/reaction example, regression examples, and exact visible fallback and Gateway diagnostic text. CI is running on the updated head.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 16, 2026
@sjf-oa sjf-oa changed the title fix(agents): honor explicit silence in directed turns fix(agents): Don't show an error message if the agent returns NO_REPLY Sep 16, 2026
@sjf-oa
sjf-oa merged commit 1b4c1a1 into main Sep 16, 2026
223 checks passed
@sjf-oa
sjf-oa deleted the sjf/claw-2-honor-explicit-no-reply branch September 16, 2026 23:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
openclaw#149642)

* fix(agents): honor explicit silence in directed turns

* test(agents): align authored silence expectations and fix lint

---------

Co-authored-by: Sarah Fortune <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants