Repository navigation
fix(codex): preserve continuity across races and paginated history - #114309
kevin2966n wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. What this changesThe PR preserves unanswered messages through steering, reads paginated Codex history, and improves client-close cancellation and observer notification. Example: Register a close observer after the Codex client has closed.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Meaningful late-close notification work remains missing on current main and the latest release. This PR remains paired with unresolved same-author issues, and the author recently confirmed continued work; no close rule applies. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin carries OpenClaw messages into native app-server turns and returns history, tool requests, and connection lifecycle events to session and cleanup owners. flowchart TD
A[OpenClaw conversation] --> B[Input bridge and steering]
B --> C[Codex app-server client]
C --> D[Native Codex turns]
D --> E[History readers]
E --> F[Session import and forks]
C --> G[Close observers and cleanup]
Technical reviewBest possible solution: Carry the missing late-close notification into the current Codex client owner and retain other changes only where supported current behavior still requires them. Do we have a high-confidence way to reproduce the issue? Closing a client and then registering a close observer deterministically misses notification in current-main source and v2026.10.4; this read-only review executed no target code. The older pagination failure is not established on managed Codex 0.161.0, and the answer-resolution race remains unverified through a production client. Is this the best way to solve the issue? Immediate terminal-state replay belongs in the existing Codex client, matching its adjacent transport-exit subscription pattern. The older branch as a whole is not the best landing shape: current main already owns cancellation, observer isolation, and supported native history hydration. Preserve those owners rather than introducing parallel lifecycle paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 204ff9770617. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +84, Tests +251. Total +335 across 11 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 (12 earlier review cycles; latest 8 shown)
Reviewed October 15, 2026, 10:41 PM ET / October 16, 2026, 02:41 UTC (Revision 13). |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Please keep this open pending validation. This is still a draft at 28b2d65. The latest review calls for current-main integration checks and after-fix evidence from a real Codex client. The next checks would be:
Those checks haven’t been verified in this PR yet. The existing mocked regression tests don’t establish the real-client behavior. |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This draft has had no commits since July 27 and still needs current-main integration and real Codex client proof. Please open a fresh PR against current main once you have that evidence; smaller per-issue PRs would also be easier to review. |
Closes #114302
Closes #114304
Closes #114305
Closes #114306
Closes #114308
What Problem This Solves
Fixes five Codex continuity failures where users could lose a message during a request-input race, fail to continue or fork paginated threads, leave request handlers running after disconnect, or miss client-close cleanup when observers throw or subscribe late.
Why This Change Was Made
The change honors the compare-and-resolve result before steering, adds one validated full-history reader for paginated and inline Codex threads, and makes the client close transition abort active inbound handlers while delivering terminal state to every observer exactly once. The implementation follows the currently checked-out official Codex app-server contracts and remains internal to the Codex extension.
User Impact
Messages survive request-input resolution races, paginated threads can be continued/materialized/message-forked, and disconnect cleanup is deterministic across active, throwing, and late observers.
Evidence
oxfmt, targetedoxlint,git diff --check, public Plugin SDK surface, protected-path, and secret scans passed.18f50c9e628af083a52d9240de09fc2db24d79cefor paginated-history and request-resolution semantics.