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 real behavior proof before merge. What this changesThe PR gives Codex ten seconds to finish naturally after a confirmed final source reply before falling back to interruption. Example: The message tool successfully sends "Synthetic final reply." with final:true.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR addresses a confirmed current-release defect, but it breaks an existing durable-history test and needs an owner decision on completion timing. Priority: P1 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Codex plugin consumes message-delivery results and native lifecycle notifications, then settles the OpenClaw attempt and its native conversation. flowchart TD
A[Confirmed final delivery] --> B[Lifecycle controller]
B --> C[Completion grace]
C --> D[Native turn completion]
C --> E[Timeout interruption]
D --> F[Attempt settlement]
E --> F
Technical reviewBest possible solution: Use bounded native completion for confirmed source replies while preserving cancellation, yield custody, and same-thread history coverage. Do we have a high-confidence way to reproduce the issue? Current-main terminal release and personally inspected Codex interruption handling establish the failure path, corroborated by current stable-version logs; no reviewer-run reproduction was performed. Is this the best way to solve the issue? The existing lifecycle controller is the appropriate owner, and the focused change preserves yield handoff, but timeout fallback still produces native interruption history. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9f2d5b596be. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +30, Tests +101, Docs +10. Total +141 across 7 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 Reviewed October 16, 2026, 1:54 PM ET / 17:54 UTC. |
Related: #111019
Related approach: #111020
What Problem This Solves
Fixes successful final message-tool replies being recorded as user-canceled turns in the native Codex conversation. This polluted later conversation context and was observed alongside repeated incorrect explanations that earlier replies had failed to send.
User Impact
Ordinary final replies can finish with a successful native tool result and native
turn/completed, rather than a false interruption marker. Real cancellation andsessions_yieldkeep their existing behavior.The session remains occupied during a bounded completion grace of up to ten seconds after the terminal tool batch settles. If Codex does not finish in that window, the existing interrupt fallback still runs and can still leave an interruption marker. No new configuration or migration is required.
Why This Change Was Made
After confirmed final source delivery, retain the native turn briefly instead of immediately interrupting its enclosing tool call. Use one absolute timer; native completion and attempt teardown clear it. The fallback checks cancellation and an already-received native terminal before interrupting. Existing sibling-result admission, steering cancellation, delivery deduplication, and yield cleanup stay with their current owners.
This is an independently implemented, narrower alternative to the bounded-native-completion approach already proposed in #111020, based on current main. It deliberately leaves the issue's
sessions_yieldcase open and does not add new post-final request-admission policy or an immediate-inbound grace bypass. Existing steering rejection/queue fallback remains in force during the wait.Evidence
final:true/sessions_yieldclose interrupts the turn, writing a false "user interrupted" marker into the thread rollout #111019 (comment)turn/interruptafter successful delivery. Afterward, natural completion, real cancellation during grace, and bounded fallback pass throughrunCodexAppServerAttemptwith protocol fixtures.git diff --checkpass.handle_task_abortpersists interruption guidance;TurnInterruptParamshas no clean-completion reason field.Validation limits: the new source was tested against deterministic protocol fixtures, not a live model or a live messaging account. Broad suites and CI duration remain for PR CI. The installed production gateway and native history were not modified.
AI assistance disclosure: implemented and reviewed with Codex assistance. Maintainer edits are enabled.