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. What this changesPreserve an already completed answer when a later successful assistant response contains only reasoning. Example: A completed operation is followed by a reasoning-only response
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a distinct answer-delivery defect still present on current main. No actionable patch defect remains, and the updated Gateway/Telegram evidence resolves the previous proof gap. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe embedded agent runner turns model responses and settled tool results into replies for messaging channels. Its terminal resolver decides whether to deliver prepared answers or replace them with a failure warning. flowchart TD
A[Model responses and tool results] --> B[Subscriber retains completed answer]
B --> C[Prepare reply payloads]
C --> D[Terminal completion decision]
D --> E[Deliver retained answer]
D --> F[Warn when no answer exists]
E --> G[Messaging channel]
F --> G
Technical reviewBest possible solution: Keep answer retention subscriber-owned and make terminal delivery honor that fact while preserving answerless-turn recovery and tool replay restrictions. Do we have a high-confidence way to reproduce the issue? Yes: the recorded baseline Gateway/Telegram run reproduces the warning replacement, and current main retains the same responsible guard. This read-only review did not execute current-main code. Is this the best way to solve the issue? Yes: the narrow exception consumes the existing subscriber fact instead of selecting another answer or weakening recovery for genuinely answerless turns. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a69dbd6385c9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +1, Tests +52. Total +53 across 2 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 9, 2026, 1:23 AM ET / 05:23 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
CI attribution for head
Paused for maintainer disposition of inherited CI. No merge, unrelated repair, CI rerun, or extra push was performed. |
|
Maintainer override: the only red job is inherited and outside this diff.
ClawSweeper is ready on this exact head, and the Telegram Test Server before/after proof is in the PR. |
|
Landed in 687e6e9. Thanks @goutamadwant! Verified on the Telegram Test Server: a turn whose answer is followed by a reasoning-only message now delivers the answer once (message 72499) instead of the warning main sent (72496), and empty turns still get the warning. |
…law#167567) Keep a completed final answer when a later successful assistant message is reasoning-only, instead of replacing it with the generic "Agent couldn't generate a response" incomplete-turn warning. Empty and genuinely incomplete turns still get the warning and side-effect note. Reported by @hannesrudolph. Fixes openclaw#167543. Co-authored-by: Ayaan Zaidi <[email protected]>
Keep a completed final answer when a later successful assistant message is reasoning-only, instead of replacing it with the generic "Agent couldn't generate a response" incomplete-turn warning. Empty and genuinely incomplete turns still get the warning and side-effect note. Reported by @hannesrudolph. Fixes #167543. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 687e6e9)
…law#167567) Keep a completed final answer when a later successful assistant message is reasoning-only, instead of replacing it with the generic "Agent couldn't generate a response" incomplete-turn warning. Empty and genuinely incomplete turns still get the warning and side-effect note. Reported by @hannesrudolph. Fixes openclaw#167543. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 687e6e9) (cherry picked from commit 59d6ef2) Co-authored-by: RomneyDa <[email protected]>
Fixes #167543
What Problem This Solves
A completed answer can survive in the transcript and prepared payloads, yet be replaced by the generic generation-failure warning when a later successful assistant message contains only reasoning. The user receives the warning instead of the answer.
Changes
The incomplete-turn guard now honors the subscriber's existing
keptAnswerfact. It does not select a second answer, replay tools, or disable protection for answerless turns. The terminal-resolution regression asserts the delivered payload and absence of a terminal error.Thanks to @hannesrudolph for the report and detailed production/source evidence, and @goutamadwant for the focused fix and regression. The contributor's commit is preserved.
Evidence
Real Gateway and Telegram Test Server Proof
Built both the pinned current-main baseline
ec7c8bb9454bab03e76057ecc000bfad35897ce9and candidated7ae52ec29e74aae83e28b6662c8d805c48ddb0din isolated Linux containers. The candidate merges that main into the contributor's branch.A scripted OpenAI Responses wire server emitted an asynchronous write call followed by a completed final answer, then a reasoning-only successful stop after receiving the settled tool result. The normal provider transport, agent loop, subscriber, terminal resolution, and Telegram dispatch all ran. A network-only preload redirected the native provider endpoint to the mock; no assistant messages, retained-answer state, or terminal results were injected into the runtime.
The repository's Telegram Test Server userbot recorded real DM turns under one host-owned Convex lease:
stopReason=stop payloads=1 tools=1 replaySafe=no, with zero reasoning/empty/missing-assistant retries.RETAINED_167543: operation complete.exactly once, with no warning. Temporary progress message 72498 was deleted.Both retained-answer runs made exactly two scripted foreground model requests. The second carried the successful write result; neither replayed the write. Separate background recap/catalog requests are excluded from that count. The write fixture was idempotent, and its recorded result reported that the existing synthetic file already had identical contents; the test proves settled potentially side-effecting tool handling, not a destructive action.
A built-Gateway CLI preflight independently reproduced the baseline mismatch: the returned payload was the warning while
meta.finalAssistantVisibleTextstill held the completed answer andmeta.error.kindwasincomplete_turn.This is a deterministic real-entry-point reproduction, not a replay of the reporter's private production session or a claim to have recovered its hidden follow-up content. Each recording completed. The runner also logged an upstream
getUpdatesproxy-fetch error; the recorded message and deletion events establish the outcomes above independently of that diagnostic.Checks
pnpm tsgonative core typecheck passed on the candidate.NO_REPLYtails, supersession, and input isolation.resolveIncompleteTurnPayloadTextwithout mocking its dependencies. They are boundary controls, not additional Telegram runs; the preceding settled-tool finalizer receipt is separately verified as unchanged from main.gpt-5-miniagent turn on the candidate, reasoning low, output budget 4096, returnedLIVE_167543_OK, with one assistant turn and no tool calls or fallback. The file-backed API credential was removed afterward.status=ok); leased files and the live API-key file were removed.Maintainer intent: checked Sarah's #162948, which preserves actionable harness/auth failure copy in this owner. This fix changes only the retained-answer exception for a successful reasoning-only tail; it leaves that error copy and side-effect warning unchanged. No overlapping Pash change was found.
Merge Danger
Two-way door: reverting restores the old classification; there is no schema, configuration, or stored-data migration. The blast radius is the shared embedded runner's incomplete-turn delivery decision across channels, not Telegram formatting or transport behavior.