fix(codex): unsubscribe bound threads after turns#85496
Conversation
|
Codex review: found issues before merge. Reviewed June 5, 2026, 5:57 AM ET / 09:57 UTC. Summary PR surface: Source +26, Tests +96. Total +122 across 2 files. Reproducibility: yes. from source inspection: current main’s bound conversation turn path can finish or fail without sending Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Rebase onto current main, call the shared app-server unsubscribe helper from the bound-turn Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main’s bound conversation turn path can finish or fail without sending Is this the best way to solve the issue? No as submitted against current main: the cleanup belongs in Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 1a3ce7c2a8da. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +26, Tests +96. Total +122 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Clockwork Diff Drake Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
5d50a84 to
f2405d0
Compare
Summary
thread/unsubscribecleanup after Codex app-server bound turns finish or fail.Tests
node scripts/run-vitest.mjs extensions/codex/src/conversation-binding.test.tsnode scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt-thread-cleanup.test.tsgit diff --checknode_modules/.bin/oxfmt --check extensions/codex/src/conversation-binding.ts extensions/codex/src/conversation-binding.test.tsReal behavior proof
Behavior addressed: Codex app-server conversation bindings now best-effort unsubscribe the bound thread after every turn attempt, including the missing-thread recovery retry path, so a recreated bound thread is not left subscribed when the retry rejects.
Real environment tested: Local macOS OpenClaw checkout on the PR branch, using the real Codex app-server conversation-binding runtime entrypoint with an isolated temporary HOME/CODEX_HOME and a stdio app-server process that records JSON-RPC calls.
Exact steps or command run after this patch:
node --import tsx .tmp-codex-proof.ts.Evidence after fix: Copied terminal output from the runtime command:
{ "result": { "handled": true, "reply": { "text": "Codex app-server turn failed: retry failed after recovery" } }, "calls": [ { "id": 2, "method": "turn/start", "threadId": "thread-old" }, { "id": 3, "method": "thread/unsubscribe", "threadId": "thread-old" }, { "id": 4, "method": "thread/start" }, { "id": 5, "method": "turn/start", "threadId": "thread-new" }, { "id": 6, "method": "thread/unsubscribe", "threadId": "thread-new" } ], "savedThreadId": "thread-new" }Observed result after fix: The command exited 0 and returned
Codex app-server turn failed: retry failed after recovery, with both old and replacement thread unsubscribe calls recorded in order.What was not tested: No live Codex hosted session was used; the proof isolates auth and exercises the OpenClaw runtime entrypoint against a local stdio app-server process, plus the targeted Vitest coverage listed above.