Skip to content

refactor(codex): deslop Codex plugin ninth pass - #161966

Merged
steipete merged 1 commit into
mainfrom
deslop/l237-codex9
Sep 30, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l237-codex9

Conversation

@steipete

@steipete steipete commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Remove remaining duplicate state and forwarding code in the Codex plugin after its eight earlier cleanup passes.

User Impact

No intended user-visible change. App-server protocol usage, openai auth/runtime/catalog routes, native subagent lifecycle and authority, and transcript/tool bytes remain unchanged. No configuration, schema, retention, permission, dependency, or installed-update behavior changes.

Why This Change Was Made

Recent merged subtree history and name-only diffs were inspected first, including #156297, #157080, #158613, #159225, #159726, #160912, #161234, and #161425. Reading began with untouched production files over 150 lines, then covered the remaining owners.

  • Store native start timestamps with active tool items; use the existing output-delta map to record streamed output; use the existing MCP-preview map to record pending, unsuccessful, and completed preparation. This removes three parallel mutable collections while preserving their lifetimes and concurrent-call behavior.
  • Let session notification sending own its existing connection-open check. HTTP producers stop repeating the same synchronous guard; payloads and cleanup remain unchanged.
  • Remove unused auth-error and thread-release cause carriers, a duplicate drain-settlement flag, and an unused catalog snapshot generation. Keep the publication generation that actually fences stale results.
  • Use the existing SDK regex escaper with identical matcher bytes, select the first matching catalog home directly, pass captured authority closures without rebinding, and share status-probe options while retaining each request's private snapshot.

Measured production reduction: 28 net lines. Three duplicate state collections are removed. The two fixture edits remove obsolete notification properties; all test cases and assertions remain.

Evidence

Exact-head hosted CI passed on f50b71a3844960fd37cb6babc68b2458e5576161, including the required CI and security statuses. Pinned squash auto-merge completed as d5e9e81e0f87c0f526f950b8d8fd40f9a3bfa698; its ancestry on current main is verified. Both task-owned Testbox leases are completed/stopped.

All test/check execution below used Blacksmith Testbox, lease tbx_01m3sf5h8g9epc1sq5wca35f7s (lease run). Published head: f50b71a3844960fd37cb6babc68b2458e5576161. Its tree matches the wrapper-verified final source tree b5b2fa57f01fe1526697452827be8ffdb5fdd9f5. The broader test/contract run used tree cc60e646d9acef06f979eecd11c93a525c051a57; only the private callback type declaration changed afterward, and its affected checks were repeated below.

  • Both pre-push import-cycle checks pass: 0 Madge cycles; 0 runtime value cycles.
  • Focused Codex proof passed: 15 files / 508 tests, Vitest duration 69.20 s. This covers native audit, dynamic tools, command output, output fidelity, hook relay, sandbox HTTP/lifecycle, auth, shared clients, thread lifecycle, catalog homes/node listing/request lifetime, and command RPC.
  • Plugin contracts passed: 48 files / 1,153 tests. The selected fs-safe, plugin-extension, test-helper, and extension-import-checker boundary tests also passed.
  • node scripts/check-changed.mjs --base origin/main --timed passed its guards, formatting, production/test typechecks, and all three Knip export scans. Its final lint chunk found the catalog closure declared as a method. The private declaration now accurately describes the existing arrow function. Final targeted production typecheck, lint, and all 7 catalog-home tests pass; the unchanged checks retain their earlier proof. No rule, baseline, assertion, retry, or timeout was weakened.
  • Fresh independent Codex autoreview of the complete final candidate is scoped-clean through P2. Formatting and git diff --check pass.

No test cases were added; two fixtures stop supplying a removed private property. The final catalog rerun took 24.85 s in Vitest (90% transform time).

The first lease expired before any payload executed during cold source preparation. A fresh task-owned mirror and allocation after source preparation resolved that infrastructure failure without touching prior-lane recovery state.

Not run remotely: the full pnpm test:extensions:batch codex, pnpm build, and standalone plugin SDK API comparison. The campaign's aggressive-mode instructions select exact-head hosted PR CI as the acceptance gate; no full-batch/build/API pass is claimed here.

Personally inspected Codex Rust contracts

Sibling revision: 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157.

  • Native tool result fields, timestamps, and output deltas: codex-rs/app-server-protocol/src/protocol/v2/item.rs:300-367,1329-1338,1407-1416,1497-1506.
  • Hook matcher parsing and exact-name fast path: codex-rs/hooks/src/events/common.rs:130-172.
  • HTTP request/response and ordered body deltas: codex-rs/exec-server-protocol/src/protocol.rs:783-847.
  • Login/refresh and read-only account probes: codex-rs/app-server-protocol/src/protocol/v2/account.rs:64-103,279-298,544-563.
  • Thread unsubscribe, listing, status and history: codex-rs/app-server-protocol/src/protocol/v2/thread.rs:719-736,1378-1449,1649-1735; connection-scoped unsubscribe: codex-rs/app-server/src/request_processors/thread_processor.rs:1017-1044.
  • Status discovery envelopes: codex-rs/app-server-protocol/src/protocol/v2/model.rs:55-65, v2/mcp.rs:96-103, and v2/plugin.rs:19-35.
Production coverage log

Baseline: 837a2e3303a251f220bd598d78aca35131667de4. 193 production files over 200 lines, sorted by baseline size. Reads were split across independent evidence lanes; the lead personally inspected every changed contract and cited Rust sources.

Lines Production file Coverage
2056 extensions/codex/src/app-server/native-subagent-monitor.ts READ: Existing assignment, submission, close, delivery, and recovery owners are distinct; current guards preserve asynchronous authority and ordering, with no sound new simplification established.
1423 extensions/codex/src/app-server/shared-client.ts READ: Removed redundant drain-settlement flag; Promise resolution and exact Set deletion are idempotent.
1288 extensions/codex/src/app-server/auth-bridge.ts READ: Removed unused error-helper cause argument and branch; credential ownership paths remain distinct.
1272 extensions/codex/src/app-server/approval-bridge.ts READ: Display sanitization, permission scopes and relay denial paths have distinct contracts.
1152 extensions/codex/src/app-server/side-question.ts READ: Ephemeral fork identity, native-only tools, source binding and settled cleanup retain distinct ownership contracts.
1112 extensions/codex/src/supervision-tools.ts READ: Shipped Supervisor compatibility preserves endpoint policy revalidation, pagination bounds, redaction, and active-only control; retain.
1009 extensions/codex/src/app-server/computer-use.ts READ: Install versus inspection paths retain native-config fence custody and post-await policy checks; no bounded follow-up required.
1005 extensions/codex/src/app-server/client.ts READ: Written and unsent cancellation and transport errors require distinct handling.
984 extensions/codex/src/app-server/dynamic-tools.ts READ: Schema projection, execution boundary, presentation, telemetry, and text budgeting already use canonical owners; remaining branches protect different source-result and delivered-result contracts.
953 extensions/codex/src/app-server/elicitation-bridge.ts READ: Approval provenance, schema mapping, persistence hints, and bounded display each preserve distinct native consent contracts.
871 extensions/codex/src/app-server/runtime-artifact.ts READ: Before/after descriptor and file identity checks protect minted artifact bytes; retain distinct local and configured-service contracts.
835 extensions/codex/src/app-server/session-binding.ts READ: Canonical lifecycle seam owns leases while Codex mutations preserve supervision, native receipts, and generation retirement fences.
824 extensions/codex/src/migration/session-binding-sidecars.ts READ: Legacy ownership discovery, lease-aware normalization, revalidation, and source archival preserve shipped upgrade state.
809 extensions/codex/src/app-server/dynamic-tool-build.ts READ: Tool policy, shell aliases, native sandbox admission, and registered versus runtime catalogs have distinct contracts; prior passes already consolidated the shell flow.
784 extensions/codex/src/app-server/client-runtime.ts READ: Retained, claimed and releasing subscriptions encode necessary ownership transitions.
750 extensions/codex/src/app-server/turn-router.ts READ: Prebind buffering, exact terminal receipts, request cancellation, and physical-close projection draining require distinct states.
746 extensions/codex/src/app-server/protocol.ts READ: Central typed request/result registry and wire-shape ownership already consolidated; open response shapes and nullable/omitted fields preserve upstream compatibility contracts.
745 extensions/codex/src/app-server/event-projector-assistant.ts READ: Typed/raw echoes, async/commentary phases, persisted boundaries, and final-answer selection require distinct state and ordering; no sound consolidation established.
738 extensions/codex/src/session-catalog-index.ts READ: Hydration, mutation fencing, retention, and retirement serve distinct invariants.
736 extensions/codex/src/app-server/compact.ts READ: Compaction request acceptance, native completion and physical exit require separate fences.
731 extensions/codex/src/app-server/inference-proxy.ts READ: HTTP, WebSocket handshake, frame, upload, resident ticket, and source-authority lifetimes have distinct admission/release semantics; no safe consolidation established.
730 extensions/codex/src/app-server/context-engine-projection.ts READ: Bounded prompt and image spans retained; literal JSON-key loss identified for separate focused fix.
718 extensions/codex/src/app-server/thread-requests.ts READ: Restricted surfaces and start/resume payload differences remain necessary.
706 extensions/codex/src/app-server/attempt-startup.ts READ: Staged resource transfer and abandoned-startup cleanup cannot safely collapse.
705 extensions/codex/src/app-server/session-binding-record.ts READ: Strict durable codec and generation-aware reads preserve shipped binding and opaque native recovery metadata.
700 extensions/codex/src/app-server/run-attempt-tool-setup.ts READ: Advertised and executable MCP inventories and authority capture serve distinct contracts.
692 extensions/codex/src/app-server/run-attempt-active-turn.ts READ: Steering custody, question claims and projection settlement remain distinct.
690 extensions/codex/src/app-server/dynamic-tool-execution.ts READ: Timeout, cancellation, retained work, observer terminal ownership, and tool-specific watchdog budgets protect distinct contracts; shared abort helper changes error bytes and was rejected.
686 extensions/codex/src/app-server/run-attempt-finalize.ts READ: Repeated outcome projection intentionally revalidates after awaited settlement.
685 extensions/codex/src/app-server/event-projector.ts READ: Receipt, projection, checkpoint, compaction, and close guards protect separate asynchronous boundaries; no sound new restructuring established.
684 extensions/codex/src/app-server/plugin-thread-config.ts READ: Explicit plugin ownership, account admission, and replay approvals have separate policy precedence; merge helper preserves literal own keys.
674 extensions/codex/src/node-cli-sessions.ts READ: Node source identity and resume reservations protect native home ownership; legacy CLI history scanning remains a distinct shipped command.
673 extensions/codex/src/app-server/run-attempt-resources.ts READ: Cleanup handles preserve exact subscription and process authority.
673 extensions/codex/src/app-server/rate-limits.ts READ: Sparse account snapshots, backend-authorized ordinary usage, reserve route, and blocking reset selection have different display contracts.
673 extensions/codex/src/app-server/event-projector-tool-transcript.ts READ: APPLIED: use the MCP details cache itself to record pending/failed/undefined preparation and remove duplicate attempted-item Set.
669 extensions/codex/src/session-catalog-list-operation.ts READ: Partial publication and foreground stepping retain different completion ownership.
667 extensions/codex/src/app-server/thread-lifecycle-io.ts READ: Start and resume differ in history preservation, rejection cleanup and binding commit.
666 extensions/codex/src/app-server/native-hook-relay.ts READ: APPLIED: replace identical hand-written regex escaping with the canonical SDK escapeRegExp helper while preserving matcher bytes.
664 extensions/codex/src/app-server/native-subagent-submission-owner.ts READ: Captured, detached, promoting, and settled receipts own different persistence and observation lifetimes; current wrappers bind state to the extracted call/history owners.
663 extensions/codex/src/app-server/scheduled-app-authority.ts READ: Captured app authority intersects current account/config/tool policy and exact runtime identity before scheduled execution.
657 extensions/codex/src/app-server/run-attempt-prompt.ts READ: Projection ranges and refresh flags preserve current input, attachments and previously covered history.
654 extensions/codex/src/app-server/native-subagent-model-source.ts READ: Source custody, executable custody, pending admissions, and cancellation guards have distinct lifetimes; no sound new reduction established.
653 extensions/codex/src/app-server/thread-supervision.ts READ: Provisional artifacts, cleanup tracking and durable branch commit retain distinct compensation paths.
652 extensions/codex/src/conversation-binding-preparation.ts READ: Source transfer, fresh versus resumed thread configuration, and retained subscription rollback protect distinct ownership phases; retain.
648 extensions/codex/src/app-server/thread-lifecycle-run.ts READ: Rotation checks mutate binding sequentially; combining them risks changed priority.
646 extensions/codex/src/app-server/plugin-inventory.ts READ: Installed versus available catalogs and stable versus display-name app ownership are distinct; recent passes already share marketplace resolution.
638 extensions/codex/src/app-server/inference-routing.ts READ: Managed physical-client route ownership and attached-thread qualification preserve custom-provider, native auth, Azure, and OAuth contracts; no sound policy simplification established.
637 extensions/codex/src/app-server/run-attempt-connection.ts READ: Native supervision, prepared auth and placement boundaries remain justified.
627 extensions/codex/src/app-server/bounded-turn.ts READ: Private and configured transports have different isolation and cleanup contracts; shared deadline spans selection retry.
626 extensions/codex/src/app-server/config-options.ts READ: Config, environment, and runtime policy precedence is explicit; optional omission and order affect cache keys and request bytes.
618 extensions/codex/src/migration/auth.ts READ: Planning fingerprints and locked apply-time account/config checks preserve independent OAuth and API-key migration contracts.
617 extensions/codex/src/command-plugins-management.ts READ: Catalog discovery, explicit install confirmation, OpenClaw authorization, and post-install refresh are distinct user operations; retain.
611 extensions/codex/src/app-server/event-projector-tool-progress.ts READ: APPLIED: remove streamed-item Set whose membership exactly duplicates output-delta state map keys.
604 extensions/codex/src/app-server/event-projector-events.ts READ: Guardian, cyber notice, hook, activity, normalized tool, and snapshot events retain distinct payloads and sequencing; prior passes removed available redundant paths.
600 extensions/codex/src/migration/plan.ts READ: Memory, skill, plugin, and credential item planning have different conflict and migration contracts.
598 extensions/codex/src/migration/source.ts READ: Native installed-plugin evidence and advisory cache discovery remain distinct; app accessibility and callable state have separate owners.
586 extensions/codex/src/app-server/sandbox-exec-server/http.ts READ: Consolidated notification readiness at session send owner.
570 extensions/codex/src/command-handler-bindings.ts READ: Resume consumes and restores exact subscription ownership; durable generation checks and public binding retirement differ intentionally.
569 extensions/codex/src/command-handler-actions.ts READ: Prepared authority is already shared; model, permission, goal, review, and compaction controls have different owning state and guards.
555 extensions/codex/src/session-catalog-parsing.ts READ: Native, node, and request validators intentionally differ in trimming, omission, and rejection.
552 extensions/codex/src/app-server/app-inventory-cache.ts READ: FOLLOW-UP BUG CANDIDATE: superseded refresh rejection publishes diagnostics without checking the refresh token, unlike successful publication; investigate old failure after successful forced refresh.
544 extensions/codex/src/native-thread-tool.ts READ: Native access snapshots principal and binding identity; archive fencing and fork attachment have distinct contracts; retain.
543 extensions/codex/src/session-catalog-control.ts READ: Pinned physical connections and background catalog reads retain separate ownership.
542 extensions/codex/src/conversation-binding.ts READ: Turn subscription custody, network-profile rotation, resume, and indeterminate cancellation cleanup require separate state branches; retain.
540 extensions/codex/harness.ts READ: Lazy callbacks preserve cold discovery; auth routing, compaction authority, retry receipts, and retirement require current guards.
536 extensions/codex/src/app-server/sandbox-exec-server/filesystem.ts READ: Distinct reservation, pinned mutation, and recursive access checks; retain.
526 extensions/codex/src/app-server/native-subagent-submission-call.ts READ: Anchored and unanchored predecessor branches preserve different native follow-up contracts; source custody and accepted submission receipts cannot be merged safely.
523 extensions/codex/src/app-server/sandbox-exec-server.ts READ: Node single-use leases and sandbox reference counts have distinct lifecycles; retain.
520 extensions/codex/src/session-catalog.ts READ: Replaced filtered-array first selection with find; retained source-home and host validation.
518 extensions/codex/src/app-server/event-projector-native-tool-lifecycle.ts READ: APPLIED: store start timestamp with its active item and remove parallel timestamp map with the same lifecycle.
516 extensions/codex/src/app-server/native-subagent-model-input.ts READ: Sender, receiver revision, provider qualification, and retained model-source checks fence separate asynchronous authority boundaries; no sound further restructuring established.
515 extensions/codex/src/app-server/computer-use-service.ts READ: Signed staging, concurrent winner, rollback, and post-install ownership checks protect distinct filesystem states; retain.
514 extensions/codex/src/app-server/thread-lifecycle-warm.ts READ: Removed unused cleanup cause field and forwarding; warm ownership rollback remains necessary.
511 extensions/codex/src/app-server/sandbox-exec-server/processes.ts READ: Process custody, output ordering, and retained byte contracts remain explicit; retain.
509 extensions/codex/src/app-server/sandbox-exec-server-node-relay.ts READ: Credential checks cover distinct encoding and format bypasses; retain.
500 extensions/codex/src/session-catalog-adoption.ts READ: Binding identity, recovery, and source-qualified FIFO checks are substantive.
500 extensions/codex/src/app-server/request.ts READ: Caller leases and scoped acquisitions enforce different lifetimes; physical-write authority, total deadlines, and isolated cleanup remain necessary.
494 extensions/codex/src/app-server/attempt-context.ts READ: Prompt and report rendering preserve byte and attribution contracts; no sound substantial reduction.
493 extensions/codex/src/migration/apply.ts READ: Activation, auth-required outcomes, config conflict checks, and item-level migration report ordering are substantive.
491 extensions/codex/src/command-diagnostics.ts READ: Confirmation, private routing, cooldown, and exact target/account revalidation protect authorized diagnostic uploads; retain.
473 extensions/codex/src/app-server/native-process-authority.ts READ: Client command admission, concrete process custody, background inventory, and original-source authority have distinct release boundaries; no safe reduction established.
467 extensions/codex/src/app-server/transport-process-snapshot.ts READ: Selected and full snapshots have distinct starvation and permission contracts; shared readProcesses has two callers.
460 extensions/codex/src/app-server/thread-lifecycle-preflight.ts READ: Authorization and effective-config checks belong to their existing owners.
460 extensions/codex/src/app-server/settled-turn-projection.ts READ: Atomic tool pairing and bounded whole-turn history groups preserve distinct evidence contracts.
457 extensions/codex/src/command-plugins-readiness.ts READ: Inventory, metadata and runtime evidence carry separate authorization and availability contracts.
452 extensions/codex/src/command-formatters.ts READ: Output formatting preserves mention escaping, email visibility, safe resume hints, and structured rate-limit fallbacks; retain.
438 extensions/codex/src/app-server/run-attempt-turn-request.ts READ: Model authority is revalidated immediately before write; accepted and uncertain starts require explicit interruption.
437 extensions/codex/src/app-server/startup-binding.ts READ: Pinned rollout reads, source-specific token snapshots and binding replacement fences remain necessary.
436 extensions/codex/src/session-catalog-rollouts.ts READ: Bounded heap, compressed/plain reading, provenance, and stable-file checks remain necessary.
434 extensions/codex/src/command-diagnostics-support.ts READ: Single-use confirmation scope, expiry, bounded cooldown state, and copyable safe identity rendering have distinct contracts; retain.
433 extensions/codex/index.ts READ: Plugin registration binds lazy state and service lifetimes; conditional catalog and supervision surfaces remain intentional.
424 extensions/codex/src/command-rpc.ts READ: Shared repeated status-probe options while preserving each request and per-call option snapshot.
424 extensions/codex/src/app-server/transport-process-containment.ts READ: Root and descendant authority plus failure unwind differ; retain.
424 extensions/codex/src/app-server/remote-workspace-media.ts READ: Fixed remote reader and chunk identity/cap validation guard separate cross-host boundaries; media mapping already has a shared copy-on-write traversal.
421 extensions/codex/src/app-server/config-reviewer-policy.ts READ: Native config, profile, CLI, environment, and provider trust checks cover different override sources; retain.
418 extensions/codex/src/app-server/inference-dispatch.ts READ: HTTP and WebSocket share preparation; request metadata, source capture, model binding, UTF-8 preservation, and retryable compression retain independent contracts.
412 extensions/codex/src/app-server/run-attempt-server-requests.ts READ: Request handlers share existing approval and tool owners; terminal diagnostics and refresh draining preserve call settlement.
409 extensions/codex/src/app-server/protocol-validators.ts READ: Generated-schema materialization, pointer traversal, default application, and labeled assertions each own distinct boundary behavior; no meaningful safe reduction established.
403 extensions/codex/src/app-server/attempt-steering.ts READ: Queue states distinguish admission, dispatched acceptance and transcript consumption; guards prevent replay and overtaking.
401 extensions/codex/src/command-handler-args.ts READ: Existing parser owner already shares bind/resume and menu logic; argument differences are meaningful.
401 extensions/codex/src/app-server/native-subagent-history-recovery.ts READ: Pinned assignment recovery, interrupted continuation, initial fork protection, and system-error fallback retain distinct history contracts; no sound duplicate flow established.
398 extensions/codex/src/session-catalog-node-continue.ts READ: Capability, source-home, history import, and deferred binding steps have different contracts.
398 extensions/codex/src/app-server/event-projector-tool-items.ts READ: Args, diagnostics, transcript output, file diff budgets, and patch recognition have separate byte/security contracts; previous pass already consolidated output ownership.
396 extensions/codex/src/app-server/transcript-mirror.ts READ: Prompt admission, terminal settlement, and async delivery use distinct persistence and delivery receipts; no sound new shared flow established.
383 extensions/codex/src/conversation-control.ts READ: Follow-up candidate: replace hand-written global singleton map initialization with SDK resolveGlobalSingleton using the same Symbol.for key.
380 extensions/codex/src/command-handlers.ts READ: Command dispatch shares owner and sandbox gates while preserving per-command argument/formatting behavior; retain.
379 extensions/codex/src/app-server/run-attempt-runtime.ts READ: Native supervision removes outer routing fields; scheduled and ordinary MCP capability decisions remain distinct.
377 extensions/codex/src/session-catalog-diagnostics.ts READ: Bounded diagnostic schema and asynchronous context release are intentional.
377 extensions/codex/src/app-server/transcript-mirror-write.ts READ: Attestation restoration, hook transformation, idempotency receipts, guarded commit, and post-commit publication are distinct ownership boundaries.
375 extensions/codex/src/command-account.ts READ: Subscription versus API-key reporting uses canonical auth eligibility and usage helpers; display order intentionally includes configured unavailable profiles.
372 extensions/codex/src/app-server/computer-use-marketplace.ts READ: Wrapper ownership is intentionally weaker than exact generation equality for replacement admission; retain both checks.
364 extensions/codex/src/app-server/upstream-fork-boundary.ts READ: Identity, prompt attestation, turn state and reread fences protect separate fork boundaries.
364 extensions/codex/src/app-server/transcript-history-projection.ts READ: Native and local history already share projection and bounded-tail ownership; remaining filtering differences preserve failed and async message contracts.
364 extensions/codex/src/app-server/canonical-session-fork.ts READ: Canonical fork verifies exact model, native tool catalog, history cut, display prefix, and subscription ownership before host readiness; retain.
363 extensions/codex/src/node-exec-server.runtime.ts READ: Node runtime retains byte-bounded framing, ordered backpressure, native-readiness handshake separation, and connection-owned process cleanup; retain.
356 extensions/codex/src/app-server/sandbox-exec-server/fs-policy.ts READ: Possible small one-use specificity/rank helper cleanup; deferred under bounded assignment.
356 extensions/codex/src/app-server/event-projector-result.ts READ: Result owner combines independently prepared projection facts; native retained-command and terminal result snapshots must precede callback effects.
355 extensions/codex/src/migration/native-task-assignments.ts READ: Doctor-only legacy reads and compare-and-apply import preserve requester lifecycle and connection identity without reviving unrelated work.
345 extensions/codex/src/app-server/native-subagent-parent-owner.ts READ: Parent registration, turn rebinding, pre-bind completion, and unregister settlement retain distinct authority/order contracts.
343 extensions/codex/src/app-server/native-subagent-close-owner.ts READ: Observed close, captured unsubscribe, current lineage, and loaded-thread confirmation guard separate race boundaries; no sound further consolidation established.
335 extensions/codex/src/session-cli.ts READ: CLI output and action validation preserve shipped behavior; follow-up can import catalog constants directly from their parsing owner.
331 extensions/codex/src/app-server/user-input-bridge.ts READ: Single per-turn input queue preserves cancellation, secret exclusion, bounded schemas, and ordinary elicitation outcomes.
326 extensions/codex/src/session-catalog-node-adoption.ts READ: Entry initialization and recovery require different validation sets.
319 extensions/codex/src/app-server/turn-params.ts READ: Current sender, stable history provenance, additional context, and native versus parent-local instructions intentionally differ in lifetime and trust; preserve prompt bytes.
319 extensions/codex/src/app-server/thread-lifecycle-adoption.ts READ: Manual adoption has stricter home and catalog admission than ordinary resume.
319 extensions/codex/src/app-server/native-subagent-completion-delivery.ts READ: Attempt deduplication and delivering flag also cover synchronous reentrancy before promise registration; retain separate delivery and execution custody.
314 extensions/codex/src/session-catalog-terminal.ts READ: Native start/resume and local/node execution have different validation and environment contracts.
311 extensions/codex/src/session-catalog-homes.ts READ: Removed two redundant binds of the generation-owned assertCurrent arrow closure.
309 extensions/codex/src/app-server/native-skill-isolation.ts READ: Bounded realpath scan and revision-aware physical-client cache protect personal-skill provenance and incomplete-scan fallback; no safe further cleanup established.
307 extensions/codex/src/app-server/attempt-workspace-context.ts READ: Workspace snapshots, persona carriers and memory discovery deliberately use different prompt lifetimes.
304 extensions/codex/src/app-server/config-parsing.ts READ: Schemas and distinct malformed-config fallback versus network restriction refusal are public configuration contracts; retain.
302 extensions/codex/src/app-server/transport-websocket.ts READ: Heartbeat, startup buffering, and byte framing contracts retained.
299 extensions/codex/src/app-server/plugin-thread-app-admission.ts READ: Installed callability and layered app enablement prevent account policy bypass; thread inventory request adapter shared locally.
296 extensions/codex/src/app-server/protocol-control-plane.ts READ: Wire contract leaf already centralizes app/plugin/config metadata; repeated nullable shapes reflect separate upstream response contracts.
296 extensions/codex/src/app-server/event-projector-media.ts READ: Observed, pending, and successfully materialized image IDs have distinct retry and side-effect contracts; merging them would change failed-transfer recovery.
296 extensions/codex/src/app-server/canonical-fork-preparation.ts READ: Local fork preparation preserves distinct tool, app, model and live-authority requirements.
295 extensions/codex/src/app-server/shared-client-lifecycle.ts READ: Retirement counters and token release guards have observable lifetime roles.
287 extensions/codex/src/app-server/config-security.ts READ: Follow-up candidate: parse requirements TOML once for sandbox, approval, and reviewer selection via requirements owner.
285 extensions/codex/src/session-catalog-index-state.ts READ: Durable admission, bounded cleanup, and retirement drain protect snapshot recovery.
281 extensions/codex/src/app-server/sandbox-exec-server/sandbox-child.ts READ: Pipe versus PTY and remote versus local settlement differences are meaningful; retain.
274 extensions/codex/src/app-server/thread-ownership.ts READ: Native queue and binding lease order preserve exact physical subscription ownership and rollback.
274 extensions/codex/src/app-server/run-attempt-notification-controller.ts READ: Wire receipt admission precedes queued projection; tool-result acknowledgment requires exact native echoed bytes.
274 extensions/codex/src/app-server/plugin-activation.ts READ: Curated automatic activation versus owner-managed marketplace installation is intentional; shared inventory refresh retains pre-await invalidation.
273 extensions/codex/src/app-server/usage-limit-error.ts READ: Structured error classification and fresh rate-limit evidence prevent generic 429s or stale snapshots from blocking profiles.
272 extensions/codex/src/session-catalog-listing.ts READ: Legacy turns and bounded item transcript commands preserve shipped node contracts.
270 extensions/codex/src/app-server/computer-use-readiness.ts READ: Probe request, accepted subscription cleanup, retry, and reload are distinct lifecycle steps; retain.
268 extensions/codex/src/app-server/session-permission-policy.ts READ: Tuple selection, exec tightening, managed requirement clamp, and effective-policy projection preserve distinct non-widening boundaries.
266 extensions/codex/src/app-server/launch-args.ts READ: CLI tokenization preserves wrapper prefixes, option values and raw TOML override order.
262 extensions/codex/src/app-server/plugin-thread-config-deadline.ts READ: Monotonic aggregate budget preserves absorbed timeout evidence and scheduled authority failure policy; retain.
262 extensions/codex/src/app-server/attempt-client-cleanup.ts READ: Interrupt acknowledgment is distinct from terminal completion; cleanup preserves shared-client peers.
260 extensions/codex/src/app-server/compact-lifecycle.ts READ: Request, compaction item and terminal turn receipts are separately correlated before lifecycle release.
259 extensions/codex/src/app-server/computer-use-unified.ts READ: Legacy plugin and MCP policy vetoes protect configured restrictions during selected desktop identity replacement; retain.
258 extensions/codex/src/app-server/native-subagent-monitor-types.ts READ: Shared leaf contracts already centralize parent, child, retained source, admission, recovery, and registration state; no unused contract established.
256 extensions/codex/src/app-server/upstream-session-fork.ts READ: Imported forks preserve source connection and exclusive history boundary; initializer ownership controls rollback and canonical forks delegate separately.
254 extensions/codex/src/app-server/desktop-generation.ts READ: Generation owner, watcher arm epoch, health reporting, and bounded rearm backoff protect distinct replacement/error races; no safe reduction established.
253 extensions/codex/src/app-server/managed-binary.ts READ: Official launcher ownership, platform artifact attestation, and desktop Computer Use priority retain distinct contracts; no safe replacement for target resolution established.
249 extensions/codex/src/app-server/run-attempt-turn-start.ts READ: Compact conflict and context overflow recovery preserve different retry and binding ownership contracts.
248 extensions/codex/src/app-server/request-attempt.ts READ: Wire settlement and local waiter expiry remain independent for requests that may already have reached native execution.
246 extensions/codex/src/migration/cli-credentials.ts READ: Native-selected storage, feature/config requirements, cancellation, and reader shutdown checks prevent mismatched credential import.
244 extensions/codex/src/app-server/run-attempt-cleanup.ts READ: Cleanup order preserves admitted projection, subscriptions, tool disposal and native authority settlement.
244 extensions/codex/src/app-server/native-subagent-turn-observation.ts READ: Observed execution, native waits, attention overlays, and assignment dependency updates have distinct state transitions; no sound consolidation established.
242 extensions/codex/src/app-server/run-attempt-context.ts READ: Transcript admission fence, bootstrap maintenance and refresh history combine under the existing owners.
240 extensions/codex/src/app-server/run-attempt-turn-state.ts READ: Terminal completion, hook renewal and settlement deadlines represent distinct lifecycle facts.
239 extensions/codex/src/session-upstream-activity.ts READ: Pinned source checks and user-message markers distinguish new human activity from mirrored own turns and missing native threads.
239 extensions/codex/src/session-catalog-projection.ts READ: Initial projection, delta reuse, and sampled-rollout merge preserve different metadata authority.
239 extensions/codex/src/app-server/run-attempt-start.ts READ: Started resources transfer before fallible verification; native model reviewer and continuity updates follow actual thread identity.
239 extensions/codex/doctor-contract-api.ts READ: Retired policy and timeout transforms preserve named shipped config contracts; state migration imports correctly remain lazy.
238 extensions/codex/src/plugin-marketplace-discovery.ts READ: Catalog fallback isolates unsupported kinds; deduplication rejects conflicting sources and intersects restrictions without erasing install evidence; retain.
234 extensions/codex/src/app-server/native-subagent-admission-custody.ts READ: Source/completion release ordering around pending-map replacement preserves reentrancy; buffer deduplication and capacity guards encode separate admission contracts.
232 extensions/codex/src/app-server/config-requirements.ts READ: Follow-up candidate: one parsed requirements projection can replace triple identical TOML parsing in security and session-permission callers.
229 extensions/codex/src/app-server/transport.ts READ: Physical exit and certified cleanup are deliberately separate; retain.
227 extensions/codex/src/app-server/dynamic-tool-catalog.ts READ: Direct, searchable, and direct-only namespace ordering is intentional; descriptor quarantine handles third-party getter failures at the plugin boundary.
226 extensions/codex/src/session-catalog-index-events.ts READ: Coalescing, source closure, and tied-turn ordering require existing branches.
226 extensions/codex/src/app-server/cyber-failover.ts READ: Workspace-target cooldown, replay-safe admission and current-turn refusal attribution are distinct.
225 extensions/codex/src/app-server/native-mcp-app.ts READ: Thread-owned runtime facade preserves MCP transport state and resource origin correlation; upstream still projects canonical MCP app URI into the legacy field, so no missing-URI bug proven.
224 extensions/codex/src/app-server/transport-process-registration.ts READ: Durable registration ordering and lifecycle timing retained.
223 extensions/codex/src/app-server/plugin-approval-roundtrip.ts READ: Two-phase approval, abort race, explicit unavailable marker, and display sanitization have distinct contracts; retain.
223 extensions/codex/src/app-server/native-subagent-recovery-coordinator.ts READ: FOLLOW-UP: isRetiredParent dependency is declared and supplied by Monitor but never read; removable dead callback seam without changing recovery behavior.
221 extensions/codex/src/app-server/native-subagent-model-lookup.ts READ: Root, child, pending model, and unqualified-source lookup require distinct ambiguity checks; generic abort helper would change error contract.
220 extensions/codex/src/conversation-binding-hooks.ts READ: Inbound paths reserve binding activity before lazy imports and recheck public/native identity; node and app-server admission differ intentionally.
220 extensions/codex/src/app-server/session-retirement.ts READ: Generation and physical-client fences join child ownership before parent subscription cleanup without affecting successor sessions.
215 extensions/codex/src/session-catalog-events.ts READ: Weak client ownership and lifecycle callbacks avoid extending transport lifetime.
215 extensions/codex/src/app-server/run-attempt-lifecycle-controller.ts READ: Tool response flush, sibling completion and steering closure jointly gate terminal-tool interruption.
214 extensions/codex/src/app-server/server-requests.ts READ: Physical-client request authority owns cancellation and bounded dynamic-tool deadlines; retained auth refresh tails drain separately.
214 extensions/codex/src/app-server/native-subagent-notification-routing.ts READ: V1 collab calls and V2 activity notifications carry different authority/discovery evidence; shared routing already separates exact accepted spawn and input paths.
211 extensions/codex/src/app-server/plugin-metadata-cache.ts READ: Query scope, negative expiry, invalidation generation, and failed pending request retry protect independent cache invariants; retain.
210 extensions/codex/src/command-handler-scope.ts READ: Shared command authority combines current session generation, destination binding, and host-owner revalidation; retain.
210 extensions/codex/src/app-server/native-subagent-assignment-inventory.ts READ: The queue returns the original persistence acknowledgment while separately swallowing observation errors; distinct promises preserve execution admission and cleanup behavior.
208 extensions/codex/src/session-catalog-native-page.ts READ: Backward transitions, missing anchors, and live-cwd filtering require separate branches.
208 extensions/codex/src/command-plugin-config.ts READ: Configured identity and curated aliases preserve source uniqueness and restrictive policy intersection; retain.
205 extensions/codex/src/app-server/desktop-generation-fingerprint.ts READ: Bundle metadata, symlink targets, and descriptor-bound content hashing provide separate replacement evidence; before/after identity checks preserve filesystem race detection.
201 extensions/codex/src/command-plugins-runtime.ts READ: Command context holds one account and physical client with repeated post-await principal/policy checks; retain.
201 extensions/codex/src/app-server/native-subagent-delivery-receipts.ts READ: Receipt matching preserves oldest unresolved assignment ownership and duplicate result families; no safe collapse of alias, received, or result matching state.

Consolidate duplicate tool projection state, notification readiness and catalog bookkeeping. Remove unused internal carriers and reuse existing SDK helpers while preserving native protocol, auth routing, lifecycle authority and transcript/tool bytes.
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 12:04 PM ET / 16:04 UTC.

ClawSweeper review

What this changes

The branch consolidates private Codex plugin bookkeeping for tool events, sandbox notifications, status probes, and session catalogs without intending to change user-visible behavior.

Merge readiness

✅ Ready for maintainer review

Current main does not contain this distinct cleanup. The earlier Codex cleanup PRs are merged predecessors, and review found no actionable correctness or security defect in the introduced patch.

Priority: P3
Reviewed head: f50b71a3844960fd37cb6babc68b2458e5576161

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The cleanup is focused and source-consistent, with substantial relevant test evidence and no actionable finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Testbox suites exercise the changed Codex projector, sandbox, and catalog owners, but the PR does not claim a live app-server run; the repository-admin author is exempt from the external-contributor proof gate. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Testbox suites exercise the changed Codex projector, sandbox, and catalog owners, but the PR does not claim a live app-server run; the repository-admin author is exempt from the external-contributor proof gate. No stored-data contract changes.
Evidence reviewed 10 items Distinct introduced change: The pinned introduced diff consolidates private projector and notification state; the verified test merge retains these changes relative to its main parent.
Current-main comparison: The verified test merge still adds the MCP preview sentinel, session sender change, and catalog closure change to the pinned main parent; prior merged cleanup has not made this branch redundant.
Notification boundary: The session-owned sender still checks transport openness immediately before sending a sandbox notification.
Findings None None.
Security None None.

How this fits together

The Codex plugin translates native app-server events and sandbox responses into OpenClaw tool output, transcripts, and session listings. Its projectors and catalog resolver consume native events and configuration, then supply session results.

flowchart LR
  A[Codex app server events] --> B[Codex plugin]
  B --> C[Tool lifecycle projection]
  C --> D[Transcript and diagnostics]
  B --> E[Catalog home resolution]
  E --> F[OpenClaw session listing]
  G[Sandbox HTTP response] --> H[Session notification sender]
  H --> A
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -28, Tests -1. Total -29 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 14 47 75 -28
Tests 2 1 2 -1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 48 77 -29

Review metrics

None.

Technical review

Best possible solution:

Keep one owner for each Codex tool and session fact while preserving native wire messages, authority checks, and transcript output.

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

Not applicable: this PR reports no broken behavior; focused projector, sandbox, auth, and catalog tests supply validation for the refactor.

Is this the best way to solve the issue?

Yes: the patch removes parallel private bookkeeping at its existing owners without adding a competing API or storage path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 18d41b7cde8f.

Labels

Label changes:

  • add P3: This is a bounded internal cleanup with no intended user-visible change or identified urgent regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a bounded internal cleanup with no intended user-visible change or identified urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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.

@steipete
steipete merged commit d5e9e81 into main Sep 30, 2026
123 checks passed
@steipete
steipete deleted the deslop/l237-codex9 branch September 30, 2026 16:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
Consolidate duplicate tool projection state, session notification readiness and catalog bookkeeping. Remove unused private carriers and reuse the existing SDK regex helper while preserving native protocol, auth routing, lifecycle authority and transcript/tool bytes.

Validation: zero Madge/runtime cycles; 508 focused Codex tests and plugin/import-boundary contracts pass on Blacksmith Testbox. Changed-file types, guards and dead-export scans pass; the callback declaration lint finding was repaired and its targeted checks passed. Independent review is clean through P2. Exact-head hosted CI remains the merge gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant