Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 6:09 AM ET / 10:09 UTC (Revision 16). ClawSweeper reviewWhat this changesThe PR preserves successful explicit NO_REPLY as silent completion through agent recovery, immediate replies, queued follow-ups, and channel dispatch, with corresponding documentation and regression coverage. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main and the latest release still misclassify successful explicit silence on required turns. No actionable introduced defect was found, and the recorded runtime evidence remains relevant after the restack. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s reply-completion pipeline combines assistant output with delivery and pending-work evidence. It determines whether channels deliver an answer, remain silent, or recover a missing response. flowchart TD
A[Incoming request] --> B[Reply expectation]
B --> C[Agent terminal output]
C --> D[Completion evidence]
E[Delivery and pending work] --> D
D --> F[Channel dispatch]
F --> G[Visible reply or intentional silence]
D --> H[Missing-response recovery]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +22, Tests +20, Docs 0. Total +42 across 14 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep explicit successful silence in the shared completion owner while preserving recovery for genuinely empty results and custody for pending delivery. Do we have a high-confidence way to reproduce the issue? Yes, from source: a required turn with successful terminal NO_REPLY and missing delivery reaches the current missing-response path. This review did not execute a failing current-main reproduction. Is this the best way to solve the issue? Yes. Reusing the existing terminal classifier and shared completion evidence repairs the runner and dispatch boundaries without adding configuration or a competing silence owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96c7ddc7e798. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
26975d1 to
2264740
Compare
There was a problem hiding this comment.
Approving. This removes the required-reply regression from #152786: explicit NO_REPLY is honored again, including for group chatter and reaction-only turns. Empty output, errors, aborts and pending work still go through recovery. Follow-ups on directly addressed messages that end silently are tracked in #156257.
2264740 to
88abfcc
Compare
8d6057c to
5f5c49f
Compare
af493b2 to
ff466f2
Compare
ff466f2 to
6216e4f
Compare
b637979 to
53d6026
Compare
|
This is problem evidence from a Codex-harness deployment on 2026.9.9. It's not a review of the implementation. Five Discord DM turns ran tools, reacted to the user's message with On the Codex harness the host does request finalization, but the Codex finalizer throws at its context check before it reaches the model call (settled-turn-finalizer.ts L36-L67). So the fallback here isn't the result of a finalization attempt that came back empty. Reading the release source, the adapter captures finalization context only when every collected assistant text is blank (run-attempt-finalize.ts L468-L498), and the collector keeps a trailing silent token (event-projector-assistant.ts L318-L340). That would leave a turn ending in This PR changes the required phased On my side, the reactions didn't pass Measured on stable 2026.9.9 ( |
|
Follow-up: passing |
Why
An explicit
NO_REPLYis a successful request for silence. Required-turn completion policy regressed that behavior in #152786, causing completed silent turns to retry or post an incomplete-response warning.What Problem This Solves
Honor successful explicit terminal silence for required and optional turns through runner recovery and immediate replies, queued follow-ups, and outer channel dispatch. Reuse the existing terminal-silence classifier and completion evidence so
NO_REPLYdoes not become a missing-reply warning or source-delivery retry. Preserve authoritative silent completion when the outer channel dispatcher reconciles transport state. Failed, aborted, pending, and genuinely empty turns retain their existing handling.For example, a user confirms a completed task with “Passed ✅”. If the assistant finishes with
NO_REPLY, the conversation stays quiet rather than posting an incomplete-response warning.Earlier validation
The results in this section predate the current restack and are historical evidence. Current-source validation is listed below.
Dispatch repair validation:
runReplyAgententry-point tests: 16 passed, covering immediate and queued silence, genuine empty replies, reasoning/commentary-only replies, and pending continuation.extensions/agentsapi/agentsapi-messages.ts: AgentsApiMessageProjection. This repair does not change that file.Earlier runner validation:
expected false to be true) and passes with the fix.Live channel proof on an isolated native-architecture Gateway:
NO_REPLY, and posted no extra reply or warning.NO_REPLYand posted no extra reply or warning.NO_REPLY; the assistant chose it through the ordinary channel flow.Remaining limitation: another model returned a completed final-answer item containing empty text, with no explicit silence marker. That case still produces the existing missing-response warning. Completed status alone does not establish intentional silence, so this repair does not suppress genuinely empty output.
The image above is illustrative, not a captured after-fix screenshot. Internal channel captures cannot be published from this environment.
Earlier retry-context stack
The earlier verification below used #161444, the Agents API retry-context fix, as its parent. Published base:
b3d36ee41e668bd364dca621fa90889ac4bba9cf. Published head:676f8702b57821c4e24821b8b2d8ca6292b0ed91.All seven repair commits were replayed. The subsequent correction to three stale silence-test expectations is amended into the original repair commit; the final tree differs from the tested
b7520c5eea1af3707878f6a8e3a51fe6837ff6fdonly in that test file. Production code is identical. In the initial restack, six patches were unchanged. One conflict was adapted to preserve the upstream removal of a redundant hook-block check; current callers already classify hook blocks before the exported silence helper. The helper still rejects failed and aborted results. The Agents API implementation is unchanged by this child PR. Fresh independent source review found no actionable P0-P2 findings.The reason for testing this stack is a real Gateway regression: after a controlled post-completion artifact HTTP 503, the Agents API context fix allowed the same run to retry successfully, but its naturally chosen terminal
NO_REPLYwas turned into a missing-reply warning by current base code. The same flow was rerun here without prompting the model to emitNO_REPLY. Correct silence is successful completion with no extra warning or reply, not proof that the earlier answer was delivered.Earlier unit and scoped static checks
At
b7520c5eea1af3707878f6a8e3a51fe6837ff6fd, 495 cases passed with no failures. Commands used the nativenode scripts/run-vitest.mjswrapper with exact owner paths and--maxWorkers=1.runReplyAgentreply-obligation casesThe eight selected reply-entry cases cover required/optional terminal silence, queued answers, genuinely empty output, and pending continuation. Their test bodies totaled 5.036 s; the 910.112 s wrapper time includes cold runtime/declaration compilation and worker preparation. The suite's other 215 cases were deliberately deselected.
Formatting for the 13 changed files, scoped TypeScript lint, MDX syntax, whitespace/conflict checks, line-count and assertion-safety guards, core graph ownership, and core/agent-test/messaging-test typechecks passed. The source remained clean and unchanged throughout these checks. The aggregate changed checker and the parent's known upstream import-cycle CI failure were not rerun; these scoped results do not claim a green full CI run.
Silence-fixture correction
The earlier hosted run failed three assertions in
src/agents/embedded-agent-runner/run/settled-turn-finalization.silence.test.ts. Those fixtures expected literalNO_REPLYto start another answer, contrary to the approved explicit-silence behavior. The required phased-silence case now requires no finalization. The two cases that observe delivery changing during recovery use genuinely empty output, with no retained earlier answer; they still require the finalizer to run exactly once and preserve their delivered/pending assertions. No production behavior, deadlines, or mocks were changed.A first correction still retained the earlier answer and failed two cases. The final published correction removes that answer only from the genuinely empty fixtures. The correction is amended into the original repair commit.
At
676f8702b57821c4e24821b8b2d8ca6292b0ed91:node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/settled-turn-finalization.silence.test.ts --maxWorkers=1: 21.158 s wrapper wall, 1.281 s test bodies.node --import tsx scripts/ci-run-node-test-shard.mts: 60.876 s wrapper wall, 53.53 s Vitest duration. This reused the captured file selection and worker setting on macOS, not identical Linux scheduling. The seven focused cases are included in the 284.The earlier hosted CI run tested the previous head against main before the PR base changed to the parent branch. Its 18-file group took 48.14 s, with 281 passing and three failing cases. Current-head CI is still running; these scoped results do not claim a green hosted run or current hosted case timing.
Combined Docker Gateway evidence and limits
The native ARM64 image at
b7520c5eea1af3707878f6a8e3a51fe6837ff6fdpassed the maintained offline image verifier. The build client stalled after exporting the immutable image and was stopped; no successful build-wrapper exit is claimed.The initial seed request timed out and the Gateway aborted/drained its run. Later saved native history contained the completed answer; the exact timeout cause remains unresolved. After the same conversation became idle and its local queues drained, one ordinary continuation exercised the intended test: a real tool barrier, accepted steering, one injected artifact-read HTTP 503 after native completion, and automatic retry of the same Gateway run. Both prompt-hook calls received the identical one-message prior history and original input identity. The native binding stayed the same and no input was duplicated.
The continuation naturally returned
NO_REPLY. The Gateway settled successfully with empty delivery/outbox/input queues; channel readback showed no additional reply or missing-response warning. A subsequent ordinary user turn delivered its exact requested answer. The retry-context and intentional-silence checks passed.The answer generated before the injected failure was not delivered, so this is not an overall answer-delivery pass. The earlier seed timeout remains a failed attempt. This used a controlled artifact HTTP 503, not a reproduced remote model 429 or outage.
Rebase verification, 2026-10-01 PDT
Rebased all seven repair commits onto captured main df75da27bcdf0e1fb5f9025bb41613347b212f36. Published head: 4245e3571a9947db029936388388c538888a9505; PR base:
main. Five patches replayed identically and two documentation patches differ only in inherited context. Whitespace checks passed. Earlier live and unit results above remain tied to their recorded revisions; they were not rerun for this rebase.