Repository navigation
fix(codex): preserve local native configuration across supervised turns - #151001
Conversation
Extract Unix catalog restore and provider capabilities from cf7cc9764a8 and da98abc78ca, plus the native lifecycle portion of 0cf8f84c694. Preserve the native OpenAI default when model_provider is unset. Document the shared local daemon setup and move native configuration regressions into focused suites.
|
🦞👀 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 changes before merge. Reviewed September 17, 2026, 10:08 PM ET / September 18, 2026, 02:08 UTC (Revision 5). ClawSweeper reviewWhat this changesThe Codex plugin preserves native configuration and tools across supervised turns, recovers retained subscriptions after startup failures, and documents shared-daemon credential ownership. Merge readiness⛔ Needs changes before merge - 1 item remains The fix remains necessary, and no blocking code defects were found. Earlier review findings are addressed; the newly added startup-failure recovery still needs real behavior proof. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s Codex plugin connects chat turns to a native Codex App Server. It verifies session ownership and execution policy before reusing a native thread, then returns results and settles its subscription. flowchart TD
A[Supervised chat message] --> B[Codex plugin]
C[Native configuration and login] --> D[Local Codex App Server]
B --> E[Check ownership and loaded policy]
E --> D
D --> F[Turn result or startup failure]
F --> G[Retain or release subscription]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource +103, Tests +525, Docs +120. Total +748 across 27 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep subscription settlement in the existing resource owner while preserving native configuration, recorded search policy, and generation-fenced reuse. Do we have a high-confidence way to reproduce the issue? Yes, from source: restoring an established supervised native catalog over Unix transport reaches the explicit rejection on current main. No runtime reproduction was executed in this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing configuration fingerprints and subscription owner is a focused repair, and the branch preserves established policy rather than introducing another configuration path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f5420c9cc61c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Addressed the three findings from this review in
Each defect failed its pre-fix regression. All 98 selected behavior tests now pass, including registered harness attribution and lifecycle/cleanup siblings. The implementation preserves the existing replacement and live-authority guards. The native metadata contract was checked directly against Codex thread/read. The PR body contains the updated validation. Earlier live screenshots remain explicitly tied to their tested commit. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Corrected both setup instructions and the linked branching guide to describe sending from the native session viewer. Also repaired the two CI failures: typed parent-controlled input refusal now preserves retained ownership, and the terminal-overflow test positively verifies intentional native retention. Both failures reproduced before repair; 271 owner-suite tests and current typechecks/lint/guards/docs links pass. Fresh independent review found no actionable P0–P2 findings. Commit: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Keep valid native subscriptions through passive preflight and pre-turn failures, preserve established search policy when daemon defaults change, and document credential ownership for shared native daemons. Co-authored-by: steipete <[email protected]> Co-authored-by: galiniliev <[email protected]>
|
Merge review disposition for
Proceeding under the explicit maintainer merge request through the native guarded workflow. |
|
Merged via squash.
|
…151349) #151001 added run-attempt.native-config.test.ts and run-attempt.subscription.test.ts without a shard owner, so test/vitest-projects-config.test.ts (full-suite ownership audit) fails on every merge ref (checks-node-compact-small-39). Register both next to their run-attempt siblings in the extension database-workers shard.
…ns (openclaw#151001) Preserve native Codex configuration, tools, and model ownership when continuing supervised conversations through a shared local daemon. Return valid retained subscriptions after passive preflight and pre-turn startup failures without weakening cancellation, revocation, replacement, or ambiguous-write safeguards. Preserve established native search policy when daemon defaults change, and document credential handoff, refresh ownership, and shared-account limits. Validation: 291 fresh focused tests passed; exact-head hosted CI passed. Additional live startup-failure/retry capture was not performed; the PR records that limitation and the earlier native proof at its original revision. Co-authored-by: steipete <[email protected]> Co-authored-by: galiniliev <[email protected]>
…penclaw#151349) openclaw#151001 added run-attempt.native-config.test.ts and run-attempt.subscription.test.ts without a shard owner, so test/vitest-projects-config.test.ts (full-suite ownership audit) fails on every merge ref (checks-node-compact-small-39). Register both next to their run-attempt siblings in the extension database-workers shard.
…151339) Restore filesystem import-boundary, workflow-routing, and full-suite inventory guards after the changes in #151302, #151282, and #151001. Route native filesystem configuration through the existing facade, register the recovery and Codex attempt tests in their existing owners, and select those guards when their inventory inputs change. Includes the reviewed routing repair from #151340 with its original human authorship preserved. Finalize the existing Gateway serial admission and two-worker ceiling before runtime placement reads recipient policy. This preserves compact worker limits when inventory changes without changing timing measurements, original compaction assertions, configuration, dependencies, or user-facing runtime behavior. Validation: exact-head CI run 35306657804 completed green; the native watcher exited 0 with no pending checks. Retained focused proof passed 1,591 tests across six files, with both new placement regressions failing before the repair and all four placement cases passing after it. Committed-branch review found no actionable defects. The pre-existing diagnostics test-support lint issue from #151161 remains an explicitly nonblocking follow-up.
…penclaw#151339) Restore filesystem import-boundary, workflow-routing, and full-suite inventory guards after the changes in openclaw#151302, openclaw#151282, and openclaw#151001. Route native filesystem configuration through the existing facade, register the recovery and Codex attempt tests in their existing owners, and select those guards when their inventory inputs change. Includes the reviewed routing repair from openclaw#151340 with its original human authorship preserved. Finalize the existing Gateway serial admission and two-worker ceiling before runtime placement reads recipient policy. This preserves compact worker limits when inventory changes without changing timing measurements, original compaction assertions, configuration, dependencies, or user-facing runtime behavior. Validation: exact-head CI run 35306657804 completed green; the native watcher exited 0 with no pending checks. Retained focused proof passed 1,591 tests across six files, with both new placement regressions failing before the repair and all four placement cases passing after it. Committed-branch review found no actionable defects. The pre-existing diagnostics test-support lint issue from openclaw#151161 remains an explicitly nonblocking follow-up.
Related: #101586
What Problem This Solves
Fixes supervised Codex sessions losing verified native tools over local Unix connections and requiring repeated policy handoffs when continuing with an existing local
config.toml. Also fixes recoverable startup failures leaving a warm native thread stuck as active.User Impact
Users can continue native Codex sessions through the running local App Server while Codex owns configuration loading, authentication, and model/provider selection. An absent or null
model_providerpreserves Codex's OpenAI default. Ordinary OpenClaw chats keep their explicit model routes. Existing native conversations retain their established search policy when daemon defaults change.Initial adoption or a changed execution policy can still require an idle native configuration handoff; the setup documentation explains how to reconnect and retry. A shared daemon keeps its native account: model-locked Chats do not provide a separate login per user or fall back to OpenClaw credentials. The new credential-ownership table explains token handoff, refresh, storage, and account-switching limits.
Why This Change Was Made
Restore native tool catalogs for verified local Unix connections, distinguish the configured native provider from OpenClaw provider overrides, and reuse supervised sessions when their ownership and loaded policy are unchanged. Document the shared local daemon setup and move existing regression coverage into focused sibling suites.
Original implementation and native proof by @galiniliev; recovery and documentation follow-up requested by @steipete and @galiniliev.
Work sessions
Evidence
Recovery and credential documentation update
Commit
8cefc5caf84b2a32f66a6c4dc6572fc82e92f1c9centralizes subscription settlement across startup and active-turn cleanup. Passive failures retain valid ownership; cancellation, revocation, replacement, and ambiguous turn-starts retain their existing safety boundaries.Earlier revision evidence
Preparation fixes:
1089e22b55673c80faa4d7be94f6e87f48fc9ce9correct the session-viewer instructions and preserve subscriptions for parent-controlled direct-input refusals. Both CI failures were reproduced locally; all 271 tests in the two affected owner suites now pass. Current production/test typechecks, formatting/lint, selected guards, and documentation links pass. Independent review found no actionable P0–P2 findings.Review repairs:
b62be2d80022696abc0febd1552e9db094a00190.3cdeef93e27passed the full build (including Control UI), production/test typechecks, applicable guards/lint, 43 targeted tests, and documentation validation (0 broken links; 1,244 configuration examples).The repairs preserve older supervised disabled-search policy when provider capabilities expand, refresh the stored and returned native model metadata during warm reuse, and retain verified subscriptions across active-thread refusal. A new branch can pick up newly advertised search support; existing bindings are not replaced.
Live native configuration proof
Tested
3cdeef93e27846d5487e9cde714803e0a3d39058with its matching built runtime on macOS, using a fresh isolated Gateway profile and the existing native daemon over Unix transport.sessions.catalog.continue. Three read-only turns completed in the same conversation, each with one canonical terminal assistant record (stopReason=stop) and no tool calls.config/read, initial selection, native thread provider, and completed turn provider/model matched. The configured provider advertised search, and the binding retained the native cached-search policy.config.tomlchecksum stayed unchanged. Missing/null provider behavior remains covered by the targeted regressions.The dashboard branches when sending from the native session viewer; the setup documentation now describes that flow. The captures show duplicate displayed answer text, while canonical transcripts contain one terminal assistant record per run; rendering is outside this change.
The screenshots show the proof conversation before continuation and after the observed turn on the candidate build. Gray masks conceal private project, account, and model details.