Repository navigation
fix: stop lost cancellations, false success, and stuck Codex compaction - #117902
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 4:47 AM ET / 08:47 UTC. ClawSweeper reviewWhat this changesThis PR changes agent, gateway, QA, and Codex app-server lifecycle handling so cancellation, terminal results, delegated replies, empty tool outputs, and native Merge readiness⛔ Blocked until stronger real behavior proof is added - 5 items remain Keep this PR open for explicit maintainer review. The exact head contains focused lifecycle-owner repairs and the author supplied materially stronger terminal proof, but this reviewer cannot complete the repository-required direct Codex dependency check: Priority: P1 Review scores
Verification
How this fits togetherAgent and gateway runtime paths turn provider streams and channel requests into session-bound lifecycle events, tool calls, and replies. The Codex extension bridges those runs to the Codex app server, including the thread subscription that receives native compaction progress and completion. flowchart LR
Input[Provider and channel requests] --> Runtime[Agent and gateway runtime]
Runtime --> Lifecycle[Run and session lifecycle]
Runtime --> Tools[Tool and delegation handling]
Runtime --> Codex[Codex app-server bridge]
Codex --> Threads[Thread subscriptions and compaction]
Lifecycle --> Output[Terminal events and user-visible replies]
Tools --> Output
Decision needed
Why: The repository policy explicitly requires the acting reviewer to inspect the sibling Codex implementation for this Codex-facing behavior, and this read-only environment cannot supply that dependency checkout or retrieve the missing promisor objects. Before merge
Agent review detailsSecurityNone. PR surfaceSource -41, Tests +429, Other +22. Total +410 across 27 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Complete an exact-head, direct inspection of upstream Codex revision Do we have a high-confidence way to reproduce the issue? Yes, at source level with medium confidence: the exact head includes focused regression coverage for route cancellation, lifecycle terminal ownership, stream cancellation, requester wakeup, empty tool results, and persistent Codex thread retention. This environment cannot run or fully inspect the dependent Codex runtime needed to establish the complete current-head reproduction path. Is this the best way to solve the issue? Unclear: the patch follows the repository's preferred owner-boundary approach by carrying cancellation and lifecycle facts from their producers, but the direct Codex protocol/runtime contract must be inspected before confirming this is the best complete repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fcaa9d48421e. LabelsLabel 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 (1 earlier review cycle)
|
Exact-head maintainer proof and ClawSweeper follow-throughReviewed head: Direct upstream Codex contract proofI inspected the complete local sibling checkout at upstream Codex revision
Redacted real-behavior terminal proofRank-up moves and review clarification
The bot's “persistent cache schema” classification is a false positive on Exact-head hosted CI is being monitored before native |
|
Final maintainer decision for current head
Proceed through repository-native prepare/merge once GitHub REST rate-limit reset permits its required hosted-gate API read. |
|
Merged via squash.
|
* origin/main: fix: stop lost cancellations, false success, and stuck Codex compaction (openclaw#117902) fix(cli): reject incomplete hosted video downloads (openclaw#117893) refactor(board): remove duplicate in-memory store (openclaw#117353) refactor: consolidate Teams and error helpers (openclaw#117907) fix(msteams): cancel unread Graph error response bodies (openclaw#117664) fix(imessage): rewind the recovery cursor when chat.db is replaced at the same path (openclaw#117788) feat(browser): relay CDP compat for Puppeteer clients (chrome-devtools-mcp) (openclaw#117915)
…on (openclaw#117902)\n\nBackport-of: 0138f5b
…on (openclaw#117902) * fix(inference): preserve cancellation, lifecycle, and Codex completion ownership * test(qa): settle visible replies on the active channel transport
* origin/main: fix: stop lost cancellations, false success, and stuck Codex compaction (openclaw#117902) fix(cli): reject incomplete hosted video downloads (openclaw#117893) refactor(board): remove duplicate in-memory store (openclaw#117353) refactor: consolidate Teams and error helpers (openclaw#117907) fix(msteams): cancel unread Graph error response bodies (openclaw#117664) fix(imessage): rewind the recovery cursor when chat.db is replaced at the same path (openclaw#117788) feat(browser): relay CDP compat for Puppeteer clients (chrome-devtools-mcp) (openclaw#117915)
What Problem This Solves
Fixes issues where users running inference, switching models, cancelling chats, delegating work, or manually compacting Codex sessions could see orphaned tools, stale or falsely successful run status, missing timeout notifications, lost delegated replies, duplicate mutating calls, permanently sleeping requesters, or a
/compactcommand that never answers.Related: #117731
Why This Change Was Made
Record and consume each authoritative fact at its existing owner: route and provider cancellation, run/session lifecycle identity, exact fallback handoff, stable child-task identity, native Codex thread subscriptions, and tool-result presence. Consolidate duplicate mock-provider completion scans and remove redundant abort/terminal adapters; preserve fail-closed handoff checks and existing config, protocol, provider, and storage contracts.
User Impact
/compactcompletes and goal context remains available afterward.Evidence
/compactand durable group-message parity cases.openai/gpt-5.4, covering streaming, tool vocabulary, approvals, goal follow-through, delegated work, and model-switch continuity.pnpm check:changedpassed: whole-project typecheck, zero-warning core/plugin/script lint across roughly 24,000 files, dependency/plugin/storage/architecture guards, and zero runtime import cycles. Full private-QA production build passed. Independent structured autoreview: clean; no accepted/actionable findings.pnpm openclaw qa run --repo-root . --qa-profile smoke-ci --scenario group-visible-reply-toolpasses through the real Telegram plugin + Crabline local Telegram provider; the same scenario also passes OpenClaw/Codex parity over QA-channel. Session identity is derived from the actual active transport, not a hardcoded channel.fbf666fa9875d0157816be3b7a20c63161d77ec5: native turn and callback cancellation (codex-rs/app-server/src/bespoke_event_handling.rs:156-203,codex-rs/app-server/src/outgoing_message.rs:469-496), empty tool outputs (codex-rs/protocol/src/models.rs:1925-1970), subscribed-only compaction notifications (codex-rs/app-server/src/request_processors/thread_processor.rs:876-900,1867-1878,codex-rs/app-server/src/request_processors/thread_lifecycle.rs:320-332), and dynamic-tool completion ordering (codex-rs/core/src/tools/handlers/dynamic.rs:196-245).