Repository navigation
fix(codex): resume remote conversations after instruction changes - #149647
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. Reviewed September 16, 2026, 7:27 PM ET / 23:27 UTC (Revision 3). ClawSweeper reviewWhat this changesAllows existing remote Codex conversations to refresh instructions without changing conversation IDs, with transport regression coverage and ownership documentation. Merge readiness✅ Ready for maintainer review This remains useful: main and the latest release still reject ordinary remote refresh. No blocking defect remains within the documented sole-owner contract; the previous competing-client finding is resolved by the explicitly accepted scope limitation, not by an atomic-handoff fix. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin connects OpenClaw conversations to native Codex threads. When instructions change, its lifecycle owner checks the connection and thread, resumes the existing conversation, and installs the current policy before admitting another turn. flowchart TD
A[Existing conversation and current instructions] --> B[Codex lifecycle owner]
B --> C{Connection current and thread idle?}
C -->|No| D[Preserve conversation and refuse turn]
C -->|Yes| E[Release subscription and resume same thread]
E --> F{Native unload observed?}
F -->|No| D
F -->|Yes| G[Install current policy and admit turn]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +136, Docs +15. Total +151 across 8 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one guarded refresh path for local and remote conversations under OpenClaw's sole lifecycle ownership, preserving native history and manual-adoption restrictions. Do we have a high-confidence way to reproduce the issue? Yes, from source: an ordinary remote conversation requiring cold or changed-policy resume reaches main's local-process guard and is refused before inference. No runtime reproduction was executed. Is this the best way to solve the issue? Yes, within the accepted sole-owner contract: the patch reuses the existing refresh owner and preserves its admission checks without introducing another conversation or configuration mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d823fa50ce9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
The maintainer has explicitly chosen to retain the sole-owner design after considering the competing-client finding. Commit 5a06d33 documents that contract in both remote policy-refresh guides. The reported interleaving is valid when another independent client can reload the same native conversation. This PR supports remote app-servers whose native conversation lifecycle is owned exclusively by OpenClaw; competing owners are outside that contract. The documentation now explicitly states that observing unload is not an atomic reservation, and the PR does not claim safe refresh across independent competing clients. The existing client-lifetime, active-turn, unload, policy-write, and binding guards remain unchanged, and unsubscribe/resume preserves the conversation ID. Supporting shared app-servers with competing owners would require a separate native handoff/attestation contract; the maintainer has declined that scope expansion here. CI repairs so far are test-only: replacing a map spread and extracting the existing lifetime/policy-refresh cases while retaining the original suite setup and cleanup. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…enclaw#149647) * fix(codex): refresh remote conversations with configured successors * fix(codex): preserve remote conversations across policy refresh * test(codex): avoid object spread in transport matrix * test(codex): extract lifetime and policy refresh cases * docs(codex): clarify sole-owner remote refresh contract --------- Co-authored-by: Sarah Fortune <[email protected]>
Why
A persistent conversation on a remote Codex app-server can stop before inference after OpenClaw instructions change. The refresh path rejects remote transports even when the existing connection can unsubscribe and resume the same native thread.
Change
Allow ordinary configuration refresh over WebSocket, Unix-socket, and stdio-proxy connections using the existing unsubscribe-and-resume flow. Preserve the native conversation ID and history, verify that the original client remains current and the thread is idle, require confirmed native unload, and install the current developer policy before admitting the next turn. Manual thread adoption retains its separate local-process requirements.
Ownership contract
OpenClaw must be the sole lifecycle owner of the native conversation, including when the gateway owns an app-server running remotely. Independent clients that can reload the same conversation during unsubscribe/resume are outside this supported contract. The connection and unload checks do not provide an atomic handoff between competing clients.
The maintainer decision is to retain this sole-owner design. Supporting independent competing owners, including native effective-configuration attestation or an atomic handoff, is outside this fix. The conversation ID remains unchanged.
Validation
thread-lifecycle.binding.test.tsandshared-client.test.ts.@openclaw/[email protected]; the local environment's dependency-age policy prevents installing that version, so this is not a claim of a local current-main suite pass.