Repository navigation
fix(codex): keep remote workers when only the OpenClaw version changes - #206231
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: passed. What this changesPreserve remote Codex parents and worker ownership when only the echoed OpenClaw version changes. Example: A remote WSS worker has completed two turns when the OpenClaw client version changes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for landing: current main retains the reported failure, the repair is narrowly scoped, and the updated upgrade evidence resolves the previous review’s blocker. No actionable introduced defects were found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Codex plugin compares live connection identity with saved thread bindings before resuming or replacing a parent; those bindings also identify pending worker assignments and submission receipts. flowchart TD
A[Gateway conversation] --> B[Live Codex runtime identity]
B --> C[Remote version matcher]
D[Saved thread binding] --> C
C --> E[Existing thread lifecycle]
E --> F[Resume or replace parent]
F --> G[Assignment and receipt stores]
Technical reviewBest possible solution: Land the narrow version matcher while retaining existing lifecycle, assignment and receipt ownership rules. Do we have a high-confidence way to reproduce the issue? Current main includes the echoed client version in remote binding identity and rotates on mismatch; the reported real-Codex control matches that source path, though this read-only review executed no target code. Is this the best way to solve the issue? The focused matcher fixes the version-only mismatch without rewriting stored ownership hashes or weakening unrelated connection and policy comparisons. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5c815265d528. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +89, Tests +102. Total +191 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 HistoryReview history (1 earlier review cycle)
Reviewed November 26, 2026, 8:01 PM ET / November 27, 2026, 01:01 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
After an OpenClaw update,
resume_agentcan find a saved remote worker butsend_inputrefuses its next task. Codex echoes the OpenClaw version in its user agent. That change alone can replace the native parent.User Impact
An ordinary chat on the same authenticated remote WSS connection can reuse its worker. Pending assignments survive a later tool change that replaces the parent. Submission receipts stay with their original parent.
Why This Change Was Made
Rebuild the connection fingerprint from the live runtime with only the saved OpenClaw version substituted. Reuse the saved bytes only on a complete match. Supervision, restricted bindings and local connections keep their existing rules. See #206089 for local connections.
Evidence
The lifecycle regression reproduced the unwanted replacement on the parent commit. All 65 focused tests passed on the first commit (259.31 s). After correcting two indexed reads in the test for strict typechecking, the 22-case file passed again with one worker (163.24 s, 609 ms for the new case). Production code is unchanged. Formatting and type-aware lint passed. Local checks reused older dependencies.
Real Codex 0.164.0 with synthetic inference and a TLS-verified test hostname routed to loopback. Both builds included #193024 and identical packaging patches. Simulated the earlier client by changing only the version in its initialize request. Each forward comparison began with two completed worker turns.
After one Resume, the parent used the third answer and completed the goal in 9.14 s. The return started from that saved state.
Data-model compatibility with v2026.11.10
Built the release tag (
6ea542fd) and this PR (b917e9cb) from unmodified source with cached dependencies. Both report 2026.11.10. These runs check previous-release data separately from the version change above. No runtime patches or edits to the handshake.tools.gatewayPolicy.allowset toget_goal,create_goalandupdate_goal. The candidate opened the copied settings, chat and worker history. One Resume kept the original native parent, verified both answers, used the same worker's third answer and completed the original goal in 8.24 s.Risks
An identical address and credential cannot prove physical server continuity. This trial did not qualify a deployment or a pair of release images. No new privileges, configuration options or migrations.