Repository navigation
fix(auto-reply): prevent false no-reply fallbacks - #115016
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 12:24 PM ET / 16:24 UTC. ClawSweeper reviewWhat this changesThis PR separates recipient-visible route delivery from editable message IDs, reports reset-hook delivery, and records accepted active-run admissions so the no-reply fallback does not duplicate valid outcomes. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain The patch has a coherent, bounded design and no discrete code defect is evident from the provided diff, but it still needs final-head real behavior proof before merge. The PR body confirms that the consolidated head was not redeployed and that the after-fix busy-turn sequence was not repeated. Likely related people: Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's auto-reply pipeline accepts an inbound channel turn, routes immediate replies or admits work to an active run, then uses delivery facts to decide whether a visible no-reply fallback is warranted. This PR changes the evidence reaching that final decision so a prior acknowledgement, an ambiguous send, or accepted deferred work is not mistaken for an empty model completion. flowchart LR
Inbound[Inbound channel turn] --> Dispatch[Auto-reply dispatch]
Dispatch --> Route[Route immediate reply]
Dispatch --> Active[Active-run steer or follow-up]
Route --> Evidence[Delivery and suppression evidence]
Active --> Evidence
Evidence --> Finalize[Fallback eligibility decision]
Finalize --> Output[Channel reply or intentional silence]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +174, Tests +453. Total +627 across 30 files. View PR surface stats
Review metricsNone. Mantis proof suggestionTelegram Desktop can directly demonstrate the two user-visible claims that remain unproven on the final consolidated head. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the routing and invocation-local admission design, then add redacted exact-head Telegram or Gateway evidence showing one reset acknowledgement without a fallback and a second message accepted by an active run without an immediate fallback. Do we have a high-confidence way to reproduce the issue? No high-confidence current-head live reproduction is provided. The source path and a prior redacted Telegram recurrence identify the busy-turn mechanism, and the PR adds focused regression coverage, but the final consolidated head has not been exercised through that real channel flow. Is this the best way to solve the issue? Yes, conditionally: extending the existing turn ledger with route-level delivery evidence and a per-invocation accepted-admission state is narrower than adding retries, timing, or new global state. The solution still needs final-head real behavior proof before it is safe to merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 40fb1ca27e4e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
0568fce to
e203b91
Compare
|
Rebased onto current main (c903ca8). New head: e203b91f06d. Focused reset/dispatch/routing validation rerun: 4 test files, 353 tests passed; git diff --check passed. |
fe9f8e5 to
35fbfa6
Compare
|
Rebased onto current @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
35fbfa6 to
b3df235
Compare
|
Consolidated the accepted busy-turn fix from #115181 into this PR so both paths share one user-facing invariant and review lane. Rebased onto current Exact-head validation: 9 files / 526 focused tests passed; isolated steering E2E passed (1/120); targeted type-aware Oxlint, core TypeScript, diff check, and secret scan passed. Consolidated autoreview is clean with no actionable findings (0.88 confidence). It also found and this head fixes a partial-delivery message-ID selection issue. @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
5c48823 to
877031d
Compare
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Maintainer verification — final-head live behavior proof (closes the ClawSweeper before-merge ask). Environment: Linux (falc0n), source checkout of exact head Before (main) — bug reproduced, including the fence side effect from #115171: The accepted second turn drew the false fallback, and the fallback advanced the foreground freshness fence so run 1's real answer was dropped as stale — After (this PR, exact head) — fixed: Zero fallbacks. Gateway log shows the exact accepted-busy shape: update 9002 received while Also verified on the exact head:
Proceeding to land. |
|
Landed via squash onto
Thanks @VACInc! |
…epted turns (openclaw#115016) * fix(auto-reply): observe routed reset hook replies * fix(auto-reply): track settled route delivery * fix(auto-reply): preserve reasoning route suppression * fix(auto-reply): suppress fallback for accepted busy turns * fix(auto-reply): preserve editable partial delivery ids * test(auto-reply): align route delivery mock * fix(auto-reply): preserve routed delivery semantics * docs(auto-reply): clarify lost adoption ownership * test(auto-reply): split routed delivery evidence cases * fix(auto-reply): preserve ambiguous route sends * fix(auto-reply): omit non-delivery sentinel ids --------- Co-authored-by: Ayaan Zaidi <[email protected]>
Summary
High Level TLDR
OpenClaw could send “No reply was generated...” even though the turn had already produced a valid outcome: a routed reset-hook acknowledgement, a routed/partial send without a conventional message ID, or work accepted by an already-active run.
Upstream PR #114799 added the shared turn-delivery ledger and fixed the general settlement race. This PR now builds on that ledger and closes the remaining concrete false-fallback paths without adding latency. The generic fallback remains available for genuinely empty, directed turns with definite non-delivery.
This consolidates the reset-route and accepted-busy-turn fixes in one PR.
Closes #115012.
Closes #115171.
Closes #115339.
What Problem This Solves
The generic failure fallback could be emitted after OpenClaw had already delivered, ambiguously sent, or accepted the user turn. This PR preserves those definitive handled outcomes while retaining the fallback for genuinely empty directed turns.
Root Cause
PR #114531 introduced a useful core fallback for directed visible turns that finish without a visible reply. Before #114799, fallback finalization primarily inferred visibility from dispatcher counts. #114799 replaced that inference with settled per-turn delivery accounting, but these sibling paths still sat outside or lost information at the route boundary.
Concrete before behavior
Routed reset-hook acknowledgement
/newor/resetcompleted.routeReply.emitResetCommandHooksdiscarded the route result instead of reporting observed delivery.The first draft treated optional provider
messageIdas delivery proof. That was not sufficient: the outbound contract permits successful or unknown-after-send results without an editable ID.Accepted active-run work
The message had been accepted; no model failure occurred in that second dispatch.
Lost route semantics
routeReplypreviously collapsed several distinct outcomes intookplus an optionalmessageId:Consumers could therefore retry, fall back, or register the wrong edit handle after a route that was already handled.
Sentinel ID leak in the route summary
The route summary correctly excluded skipped and suppressed results from delivered evidence, but when no visible result existed it fell back to the last raw result message ID. Slack delivery-hook suppression returns the control sentinel
suppressed, so the summary exposed a non-delivery sentinel as an editable identity. The existing regression expectations explicitly encoded both leaked values,skippedandsuppressed. The final head returns no message ID whenever delivery is false and corrects those expectations.What changed
deliveredevidence independent of optional message IDs.adapter_returned_no_identityas ambiguous/handled so callers cannot duplicate an unknown-after-send route; nomessageIdis exposed.Rejected, deduplicated, aborted, and queue-overflow admissions retain their existing behavior.
User impact
/newand/resetproduce only their intended acknowledgement.Evidence
The exact base and then-current PR head were built in isolated checkouts and exercised through a real Telegram direct message on Proxmox Crabbox with the native Codex app-server runtime.
Real behavior proof
Exact-SHA Telegram and Codex before/after
Environment:
b07efcb6dc7e84451b8421637f412df4de4a52ab.877031d21022511b9522b201310c9a39446154b5.openai/gpt-5.6-solwith forcedagentRuntime.id: codex;/statusreportedRuntime: OpenAI Codexon both lanes.collect, matching the affected operator configuration. Telegram progress streaming was disabled so an editable progress draft could not hide the fallback under test.Manual sequence on each exact SHA:
sleep 25.sleep 25process is active on the guest.Observed before on the base SHA:
Observed after on the PR head:
This proves the changed behavior at the real channel boundary: base misreported accepted busy work as a model failure, while the exact PR head kept the accepted dispatch silent and allowed the owning Codex turn to finish.
Live Telegram reset coverage
The earlier live reset observation remains valid for the sibling reset-hook path: a bare
/newproduced exactly one intended acknowledgement and no generic fallback during the observation window. The new Crabbox run above supplies the previously missing exact-head busy-turn proof.Verification
Current live PR head:
7f8e7fa2fb1091e4a148958f45a61af23069ca9d.The live before/after proof used base
b07efcb6dc7e84451b8421637f412df4de4a52aband busy-turn proof head877031d21022511b9522b201310c9a39446154b5. Both exact source trees were installed and built independently on Crabbox. The final head adds only the focused sentinel-ID correction proved below.Focused validation recorded for the branch:
Commands:
git diff --check: passed.Focused sentinel-ID leak regression
The final head was tested red/green at the route-result seam. With only the corrected expectations applied to the prior production code, the test failed and showed the leaked control values:
After applying the production fix:
oxfmt --checkpassed for both changed files,git diff --checkpassed, and fresh Codex autoreview reported no accepted or actionable findings.Performance
No network calls, storage reads, timers, retries, polling, model work, or additional waits were added. The new work is bounded in-memory state plus a reverse scan of already-produced send results. Accepted busy turns skip the turn-ledger settlement wait entirely.
What was not tested
adapter_returned_no_identitywas available; the actual durable delivery seam is covered by the focused test.agent-runner.runreplyagent.e2e.test.tsfile has unrelated baseline/environment failures on currentmain; the changed steering case passes in isolation.AI Assistance
Codex traced and implemented the shared fallback fixes and ran the required branch review. ClawSweeper identified the stale-base and delivery-proof concerns. Fable independently reviewed the implementation through Claude CLI, including the adoption-loss and final ambiguous-send behavior.