Skip to content

fix(codex): let idle chats resume while other chats are running - #136196

Merged
steipete merged 3 commits into
mainfrom
steipete/codex-session-runner-conflict-85a4a8
Sep 2, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/codex-session-runner-conflict-85a4a8

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #136143 — idle Codex chats falsely report another runner when unrelated work shares their app-server.

What Problem This Solves

Fixes an issue where users continuing an idle Codex chat would receive “Codex session became active in another runner” while an unrelated chat, catalog reader, or prewarm acquisition used the same app-server. Ordinary cold resume incorrectly required exclusive use of the entire shared client. Even a completed acquire/release pair could invalidate preparation.

Why This Change Was Made

Coordinate OpenClaw lifecycle mutations around the target native thread, then acquire/revalidate its binding lease. Capture the actual physical client's lifetime rather than treating unrelated pool activity as lost ownership. The same ownership order now covers resume/attachment, conversation-bound turns, compaction, and retirement; old lease-generation exclusivity, the separate compaction queue, the attachment wrapper, and caller-supplied pre-write error classification are removed.

Native status/claim checks, cancellation, stale-client rejection, configuration/policy handoff, catalog attestation, binding CAS, and exact-owner cleanup remain. A rejection by the physical pre-write callback is recorded at that callback, so cleanup distinguishes a request never sent from an indeterminate native write.

Scope: OpenClaw only; unchanged Codex 0.151.0. No process-per-chat isolation, automatic history forks, configuration knobs, persistence/schema changes, dependency changes, or native protocol additions. OpenClaw's queue does not reserve a thread against Codex-internal AgentControl reloads; the separate native-internal same-thread race remains outside this fix. The docs make that limitation explicit.

User Impact

Independent chats and catalog reads continue in parallel on a shared Codex app-server. Resuming a chat preserves its native thread identity and history rather than forking it to escape contention. Genuine target-thread activity and stale physical owners are still rejected.

Evidence

Real Gateway and Control UI

Unchanged native Codex 0.151.0, authenticated openai/gpt-5.6-sol, fresh synthetic workspace, isolated state and port; no operator Gateway touched.

  • Before: seed A with a marker, restart the baseline Gateway, hold B inside a real native command, then resume A. The exact reported error appears; B completes after its gate is released.
  • After: switch the same state to the candidate, hold another B command, and resume A. A replies ALPHA_CEDAR_731 RESUMED before B's gate is released; B then replies B_FINISHED.
  • Read-only identity checks confirm A kept its original native thread ID across restart, used a new physical client, and shared that client with B's different native thread. Both sessions finish done.
  • Screenshots and the unmocked recording were inspected for the asserted states and sensitive data. All chat/workspace content is synthetic. The two recall requests in the after screenshot are the failed baseline attempt and successful candidate attempt in the same conversation.

Native dependency contract

Personally inspected pinned Codex 0.151.0 source, including thread-keyed request serialization and independently drained queues and its different-key concurrency regression. An actual-binary protocol probe also completed A's policy handoff and turn while B remained active. Native configuration reload alone does not rewrite existing developer history, so OpenClaw's explicit policy injection is retained.

Regression and deterministic stress

The new owner-boundary regression failed on the original code with the exact CodexAdoptedThreadActiveError before production edits. The final production code passed 684 tests in nine focused files, including shared-client lifetime, lifecycle/bindings, resume cleanup, compaction, retirement, conversation binding, and client cleanup. Seven selected boundary cases were rerun after test-only refinements.

OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs extensions/codex/src/app-server/shared-client.test.ts extensions/codex/src/app-server/thread-lifecycle.binding.test.ts extensions/codex/src/app-server/thread-resume.test.ts extensions/codex/src/app-server/compact.test.ts extensions/codex/src/app-server/session-retirement.test.ts extensions/codex/src/conversation-binding.test.ts extensions/codex/src/app-server/client-runtime.test.ts extensions/codex/src/app-server/run-attempt-thread-cleanup.test.ts extensions/codex/src/app-server/thread-lifecycle.test.ts

Seeded host-owned stress ran 100 rounds × eight thread owners in four passing local runs: 3,200 lifecycle operations. It checks same-thread predecessor ordering, unrelated lease interleavings, unchanged IDs/no starts, policy injection, exact unsubscribe accounting, replacement-claim protection, and zero leaked active/pending leases. This is deterministic OpenClaw/wire-boundary stress, not live model inference.

Validation

  • pnpm build passed, including full runtime, declarations, plugin SDK, and Control UI; zero ineffective-dynamic-import warnings. The subsequent production change was only a lint-only local-variable rename.
  • After the three lint-only repairs, 263 lifecycle/conversation tests passed in two files, including another 800-operation seeded stress run.
  • Fresh isolated Codex autoreview on the final patch: scoped-clean, no actionable findings at its default P0-only threshold; reviewer did not run tests.
  • Changed-check components: formatting, extension and test typechecks, doctor contracts, boundary/dependency/coercion/deprecation guards, and dead-export scans passed. The initial wrapper run exposed three lint violations; corrected lint and all remaining database-first/media/sidecar/import-cycle guards passed when run separately, without repeating already-green gates.
  • Review fixes passed 389 tests in six files: supported legacy binding rows remain resumable, and two distinct plugin module copies serialize same-thread/conversation work while unrelated keys proceed. All four review regressions failed before the owner-boundary repairs and passed afterward. A preceding test-only CI correction passed 162 tests in five files.
  • The independent expanded live suite failed during the second compaction wave's durable large-output assertion. It passed 16 child runs, native child bridging, the first compaction wave, and all three same-native-ID/history-preserving restarts. A successful 100,000-byte-output command had only a 63-character durable mirror result; raw output was not retained, so attribution is unresolved. No retries or weakened assertions. This lane is non-blocking by explicit maintainer direction, and a separate output-mirroring investigation is queued. Existing primary live before/after proof passed. No native-internal atomicity guarantee is claimed.

Review and CI follow-through

Ordinary resume serializes its own binding without applying foreign-adoption checks to legacy rows whose top-level session generation is absent. Explicit adoption remains strict. The raw legacy fixture was preserved rather than hiding the upgrade regression. The queue is now process-global through the existing SDK singleton helper, covering duplicate dist/source module copies. Startup tests now induce real authority refusal and native overload rather than expecting the removed false lease guard.

The previous CI run's remaining failure was the unauthenticated scan-history fetch before scanners. The existing infrastructure repair is #136232; it is not duplicated here.

Production +668/−631 = +37 lines; tests +590/−228 = +362; docs +19/−4 = +15. Most raw production churn is indentation from moving the existing conversation flow under its owner scope. Net growth supplies missing owner coverage, pre-write rejection provenance, cross-copy serialization, and preserved legacy-resume behavior; the shared-client fix itself deletes more code than it adds.

Before: idle chat A falsely fails while chat B is running

After: chat A recalls its history while chat B remains active

attachment-2590036021.mp4

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review September 2, 2026 09:14
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: XL maintainer Maintainer-authored PR labels Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 7:02 AM ET / 11:02 UTC.

ClawSweeper review

What this changes

The branch replaces whole-client lease exclusivity with per-native-thread lifecycle coordination so an idle Codex chat can resume while unrelated chats or catalog reads use the same app-server.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this protected, maintainer-owned PR open while exact-head CI and the remaining upstream contract check complete. No introduced correctness defect was identified in the reviewed owner boundaries; likely related person: steipete (high confidence, recent Codex lifecycle contributor).

Priority: P2
Reviewed head: 680fef8adf7eecff08a26795621823e3cbff6a5f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has a coherent owner-boundary repair and focused regression coverage; exact-head CI and direct upstream-contract reinspection remain before landing.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body supplies claimed isolated Gateway and Control UI before/after evidence, but the linked media could not be fetched during this review because GitHub DNS was unavailable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body supplies claimed isolated Gateway and Control UI before/after evidence, but the linked media could not be fetched during this review because GitHub DNS was unavailable.
Evidence reviewed 6 items Current-main failure predicate: Current main still captures configuration ownership by requiring a sole shared-client lease, no pending acquire, and an unchanged lease generation; this is the linked issue's false-contention predicate.
Changed owner boundary: The PR snapshots the session binding, acquires the target thread's mutation queue before its binding lease, and rejects a replaced binding before preparation.
Physical-client lifetime check: The replacement lifetime guard rejects retired, closed, replaced, or desktop-invalid clients without treating unrelated shared leases as lost ownership.
Findings None None.
Security None None.

How this fits together

The Codex plugin binds an OpenClaw session or conversation to a native Codex thread on a shared app-server. Resume, compaction, conversation turns, and retirement use that binding to coordinate native subscriptions and return replies to the originating chat.

flowchart LR
  A[OpenClaw chat] --> B[Codex plugin]
  B --> C[Session and conversation binding]
  C --> D[Per-thread lifecycle queue]
  D --> E[Shared Codex app-server]
  E --> F[Native Codex thread]
  F --> G[Chat reply and lifecycle state]
Loading

Before merge

  • Resolve merge risk (P1) - This bug fix has a net production increase of 37 lines in session-to-thread lifecycle ownership; its extra state checks are justified by the repaired boundary but remain session-state-sensitive until exact-head CI is green.
  • Resolve merge risk (P1) - The reviewer could not independently inspect the pinned upstream Codex serializer because the required sibling checkout is absent and GitHub DNS failed; that contract should be rechecked from a capable checkout before landing.
  • Complete next step (P2) - Let required CI complete green on the current head and recheck the pinned Codex request-serialization contract from a checkout with upstream access before landing.
Agent review details

Security

None.

PR surface

Source +37, Tests +362, Docs +15. Total +414 across 17 files.

View PR surface stats
Area Files Added Removed Net
Source 10 668 631 +37
Tests 6 590 228 +362
Docs 1 19 4 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 1277 863 +414

Review metrics

Metric Value Why it matters
Production versus test delta production +37; tests +362; docs +15 The added production ownership scope is modest but changes session/thread lifecycle coordination, while most growth is focused regression coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #136143
Summary: This PR is the explicit candidate fix for the canonical report of false cross-chat Codex resume contention.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Complete exact-head checks and contract review (recommended)
    Allow landing after required CI is green on the current head and a capable reviewer directly verifies the pinned Codex serialization behavior.

Technical review

Best possible solution:

Keep the per-thread queue and physical-client lifetime split, then land only after exact-head CI is green and the pinned Codex request-serialization contract is directly rechecked.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main's shared-client predicate rejects ordinary resume when unrelated leases or acquires change the client lease state, and the linked issue supplies the focused path from that predicate to resume preparation.

Is this the best way to solve the issue?

Unclear as a final merge verdict: the source design cleanly moves exclusion to the native-thread owner and preserves client invalidation, but direct inspection of the pinned upstream Codex serialization contract was unavailable in this environment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 071e3b0e1099.

Labels

Label justifications:

  • P2: The PR repairs a bounded but user-visible Codex chat-resume failure rather than an emergency availability or security defect.
  • merge-risk: 🚨 session-state: It changes the coordination and cleanup of durable session/conversation bindings and native thread subscriptions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body supplies claimed isolated Gateway and Control UI before/after evidence, but the linked media could not be fetched during this review because GitHub DNS was unavailable.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let exact-head required CI finish green.
  • Recheck the pinned Codex request-serialization source from a checkout with upstream access.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-02T09:22:57.583Z sha 5df8f5d :: found issues before merge. :: [P2] Share the thread-mutation queue across plugin module copies
  • reviewed 2026-09-02T09:39:32.766Z sha 0cca21110cee47b3923321083ce0210dd60abf2b :: needs changes before merge. :: [P2] Share the thread-mutation queue across plugin module copies
  • reviewed 2026-09-02T10:03:08.464Z sha cf52968a69ada9df68d78291a779684a6819c39e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T10:15:01.987Z sha cf52968a69ada9df68d78291a779684a6819c39e :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review findings in cf52968a69ada9df68d78291a779684a6819c39e:

  • Legacy rows: ordinary resume now uses the thread-mutation queue without applying foreign-adoption ownership rules to its own binding key. Explicit attachment/pending adoption retains the stricter owner check. The earlier fixture-generation stamp was reverted: the original raw/doctor-hashed MCP upgrade cases now pass against the real production fix. The orphan Doctor migration still skips unstamped rows; no schema or migration change was made.
  • Duplicate module copies: native-thread and conversation activity queues now use the existing process-global singleton seam. Two new regressions load distinct module copies, prove same-key ordering, and prove other keys proceed. Both failed before the fix and pass afterward. This completes both ClawSweeper rank-up moves.
  • Startup tests: preserve native overload with sibling leases, induce a real host-authority refusal rather than the removed false contention guard, and assert that known executable-owner invalidation sends no native request. Production behavior was not changed for those test corrections.

Latest focused verification: 389 tests in six files passed, including all four reproduced review regressions and the seeded lifecycle stress. Test-only CI repair verification also passed 162 tests in five files. Lint, extension/test typechecks, updated runtime build, and fresh scoped Codex autoreview passed. Production now nets +37 lines; the additional ownership scope is the cross-copy queue plus preserving supported legacy bindings.

The snapshot check remains deliberately fail-closed when the prepared binding owner changes; it does not silently prepare under a different owner. Finer client-only re-admission and separate retired-client diagnostic naming remain non-blocking follow-ups, not changes smuggled into this repair.

The latest red CI check on the previous head failed in Fetch pull request scan history, before scanners, with Git's missing-username/authentication error. The already-open fix is #136232; it is not duplicated here. Exact-head CI is running again on this final ownership fix. The additional authenticated restart/fan-out/compaction suite is running independently in an isolated worktree and, per explicit maintainer direction, will not delay CI-green landing; its results will be reported separately. Existing real before/after Gateway proof remains attached.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 2, 2026
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Independent live/stress result on cf52968a69ada9df68d78291a779684a6819c39e: the full expanded suite did not pass. It remains a non-blocking lane per explicit maintainer direction; this is not reported as green proof.

Passed: two eight-child waves with distinct native threads and exact replies (16 children total); native child bridge and parent-owned direct-input rejection; /new; the first compaction wave with three completed/persisted compactions and hidden-marker recall; and all three Gateway/Codex restarts with the same native thread, exact history markers, and a changed physical client.

Failed: during the second post-restart compaction wave, a native command matching the requested 100,000-byte-output argv completed successfully, but the durable chat-history mirror contained a 63-character successful tool result without large-output evidence. The existing metadata-only fallback is consistent with that length, but the exact raw output/notifications were not retained before the unchanged test fixture cleaned itself up. This does not establish either a regression from this PR or a harmless flake. Sibling-deletion continuation was not reached.

The worker made no production/test changes, retries, or weaker assertions. A separate output-mirroring investigation is queued to reproduce with retained raw notifications and durable state. The thread-ownership, legacy-row, and duplicate-copy fixes retain their passing targeted and primary live before/after evidence; exact-head CI is still required for landing.

Replace shared-client sole-lease checks with target-thread coordination and
exact physical-client lifetime validation. Preserve native thread IDs,
policy handoff, stale-owner rejection, and precise cleanup across resume,
conversation turns, compaction, and retirement.

Fixes the false "another runner" failure when unrelated chats or catalog
readers share a Codex app-server. Native Codex remains unchanged; internal
same-thread reloads are explicitly outside this host-owned coordination.

Regression, seeded concurrency stress, and real before/after Gateway proof
cover the reported path. Context: #136143
Keep overload and prewrite-refusal coverage without relying on false sibling-lease contention. Assert executable-owner rejection before native writes and retain the canonical session generation in raw binding fixtures. No production behavior changes.
Keep foreign-thread ownership scans on explicit adoption, not ordinary resume of a supported binding row without sessionId. Revert the fixture-only generation stamp so the original upgrade regression remains covered. Share thread and conversation queues across duplicate dist/source plugin copies through the existing process-global singleton seam.
@steipete

steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Release coordination update: the current 680fef8adf7eecff08a26795621823e3cbff6a5f head has passed CI 33621886675, attempt 2, including attached required gate 100223245146. GitHub now reports the PR open, mergeable and clean; the earlier main conflict has been resolved. The 2026.9.1 release is waiting for the normal landing, then will rebase onto latest main.

Our parallel read-only conflict investigation stopped when the branch advanced; it made no competing source change or publication. No source/check waiver or change to the existing separately tracked compaction follow-up is implied. The earlier CI recovery used the workflow's normal second-attempt hosted-runner route.

@steipete
steipete force-pushed the steipete/codex-session-runner-conflict-85a4a8 branch from cf52968 to 680fef8 Compare September 2, 2026 10:54
@steipete

steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Landing update and disposition for the latest ClawSweeper review:

  • The CI infrastructure repair fix(ci): fetch security scan history during authenticated checkout #136232 merged as 9fda3b1. This PR is rebased onto main; current head is 680fef8. The only textual conflict removed two imports whose uses had independently disappeared. git range-diff confirms the three repair commits otherwise retain their changes.
  • Post-rebase proof: 209 tests passed across lifecycle bindings, user MCP upgrades, duplicate-module ownership and resume cleanup; resolved-file lint and fresh scoped Codex autoreview passed. Exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/33621886675, attempt 2, completed successfully on 680fef8. The security job's first attempt failed fetching the pinned pre-commit hook repository before the private-key hook ran; one unchanged job rerun passed. No checks, scanner configuration, or assertions were weakened.
  • Disposition of the independent expanded-live observation: keep the unresolved large-output mirror failure separately tracked under the explicit instruction not to delay CI-green landing for that lane. This is not a claim that it reproduces on main, is unrelated, or has been fixed. Its failed result and partial successes remain documented in fix(codex): let idle chats resume while other chats are running #136196 (comment).
  • Rank-up move for attribution comparison: not completed here. The original fixture removed its raw notifications/state; a faithful replay with retained evidence is queued as the named output-mirroring follow-up. No timeout, assertion, or CI requirement is weakened. The earlier queue-sharing and legacy-row review findings are fixed and verified.

@steipete
steipete merged commit accb53f into main Sep 2, 2026
375 of 377 checks passed
@steipete
steipete deleted the steipete/codex-session-runner-conflict-85a4a8 branch September 2, 2026 11:10
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 2, 2026
Align package, plugin, macOS, and standalone Android versions; refresh canonical native translations and approved SDK retention notes. Align managed Codex and trusted package assertions to 0.152.1, preserve the shared ACP workspace contract, and normalize native source literals at one language-aware owner.

Release-only preparation retains root CHANGELOG until final Code validation. Local generated/preparation checks, regression and actual-binary probes, and all twelve independent review passes are green. This intermediate snapshot will be rebased onto current main after #136196 lands; it is not the final Code SHA.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
…claw#136196)

* fix(codex): let idle chats resume alongside other threads

Replace shared-client sole-lease checks with target-thread coordination and
exact physical-client lifetime validation. Preserve native thread IDs,
policy handoff, stale-owner rejection, and precise cleanup across resume,
conversation turns, compaction, and retirement.

Fixes the false "another runner" failure when unrelated chats or catalog
readers share a Codex app-server. Native Codex remains unchanged; internal
same-thread reloads are explicitly outside this host-owned coordination.

Regression, seeded concurrency stress, and real before/after Gateway proof
cover the reported path. Context: openclaw#136143

* test(codex): align startup fixtures with thread ownership

Keep overload and prewrite-refusal coverage without relying on false sibling-lease contention. Assert executable-owner rejection before native writes and retain the canonical session generation in raw binding fixtures. No production behavior changes.

* fix(codex): preserve legacy resume and share lifecycle queues

Keep foreign-thread ownership scans on explicit adoption, not ordinary resume of a supported binding row without sessionId. Revert the fixture-only generation stamp so the original upgrade regression remains covered. Share thread and conversation queues across duplicate dist/source plugin copies through the existing process-global singleton seam.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex chat resume falsely reports another runner when unrelated work shares the client

1 participant