Repository navigation
fix: preserve GPT-5.6 Max and Ultra through Codex - #126492
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready proof for exact head
Known proof gaps: none for the changed behavior. No UI source changed, so screenshot evidence is not applicable; the real gateway session selection and outgoing Codex lifecycle effort were asserted directly. |
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 12:41 AM ET / 04:41 UTC. ClawSweeper reviewWhat this changesCarries selected GPT-5.6 Max and Ultra reasoning capabilities from the prepared catalog through Codex execution, while preserving validated selections privately in Gateway session state. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The branch has focused owner-boundary coverage and reported real app-server proof, but this checkout lacks both the pinned sibling Codex source required for the dependency contract and a current-main baseline/history, so this review cannot make a merge verdict. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOpenClaw turns model-picker and directive choices into a prepared model capability, then passes it to the selected agent harness for execution. Gateway also projects persisted session choices back into the session UI without exposing private validation provenance. flowchart LR
A[Model picker and directives] --> B[Prepared model catalog]
B --> C[Thinking capability]
C --> D[Final executable model]
D --> E[Codex app-server turn]
A --> F[Private session selection]
F --> G[Gateway session projection]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +371, Tests +537, Other 0. Total +908 across 46 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Have a reviewer with the pinned Codex 0.147.0 source verify model/list and turn/start effort semantics, then merge only after exact-head CI confirms the prepared-capability and private-projection boundaries. Do we have a high-confidence way to reproduce the issue? Yes, the PR describes a concrete real OpenAI API-key and Codex app-server matrix for the affected selectors; this read-only environment could not rerun it because the required live route was unavailable. Is this the best way to solve the issue? Unclear. The final-model capability boundary is a coherent repair shape, but the required direct inspection of pinned Codex source and current-main comparison could not be completed here. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f289685bf311. LabelsLabel changes:
Label 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 (5 earlier review cycles)
|
|
Addressed the latest ClawSweeper review on exact head
Exact-head CI is attached and running. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the remaining ClawSweeper finding on exact head
Exact-head CI is attached and running. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the cross-provider fallback finding on exact head
Exact-head CI is attached and running. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Carry harness-owned effort metadata from the prepared catalog to the final executable model without leaking it across model or harness changes. Preserve exact GPT-5.6 registry metadata and persisted Ultra selections across route-scoped projections.
f51cecb to
cbdd781
Compare
|
Addressed every item from the latest ClawSweeper review on rebased head
Production is +477/-125 (net +352); tests/test support are +656/-100. Exact-head CI is attached and running. Per the repository review policy, the fresh ClawSweeper review covers this head once its sole finding is addressed and exact-head CI is green; this push contains only that finding repair plus the requested mechanical rebase, so no redundant re-review is requested. |
|
Merged via squash.
|
* fix(agents): preserve GPT-5.6 thinking capabilities Carry harness-owned effort metadata from the prepared catalog to the final executable model without leaking it across model or harness changes. Preserve exact GPT-5.6 registry metadata and persisted Ultra selections across route-scoped projections. * fix(agents): resolve ambient catalog owner * test(commands): mock thinking hydration policy * fix(sessions): validate persisted thinking selections * fix(commands): persist thinking selection provenance * fix(agents): scope thinking hydration per fallback * fix(sessions): hide fallback thinking provenance
Related: #126005
Follow-up to #126182
What Problem This Solves
Fixes an issue where users selecting GPT-5.6 Max or Ultra through the Codex harness could see the correct choices in the model picker, but the actual turn would silently omit or downgrade the requested reasoning effort. Sol and Terra Ultra were especially affected on OpenAI API-key routes; persisted Ultra could also be displayed as Max in session rows.
Why This Change Was Made
The model picker, turn admission, executable model resolution, and session projection were reading different catalog views. This change makes the prepared catalog the capability owner: exact registry models keep their metadata, provider and Codex effort lists merge without erasing each other, plugin-harness turns hydrate the selected prepared capability, and a narrow immutable thinking capability is carried to the final executable model. Provider-owned capabilities stay bound to their physical route; harness-owned capabilities stay bound to the exact model and harness, so auth rematerialization works without leaking stale metadata across reroutes.
Gateway session projection now uses a private durable selection fact recording the exact provider, model, harness, and level that validated a persisted override. That lets a valid Codex Ultra survive a narrower route-scoped catalog while stale legacy or cross-runtime values are still clamped. The fact is stripped from public and Plugin SDK session projections and cleared by model-selection paths that cannot revalidate it.
The change also consolidates the duplicated thinking-compat projector used by SDK sessions and direct compaction. AI-assisted; I reviewed the owner boundaries and live behavior.
Production LOC is +477/-125 (net +352). The growth establishes two missing ownership boundaries: prepared catalog capability propagation into the final executable model, and private persisted selection provenance for Gateway projection. Tests and test support are +656/-100 (net +556); tooling is net neutral. No SQLite schema-version or protocol-version change is required.
User Impact
GPT-5.6 Sol and Terra now execute Max and Ultra exactly as selected through Codex. GPT-5.6 Luna executes Max, while Ultra remains unavailable as intended. Session rows preserve a validated Ultra selection and include it in the available choices, but no longer expose unsupported legacy or cross-runtime stored levels as effective.
Evidence
effort: null.openai/gpt-5.6-sol=maxopenai/gpt-5.6-sol=ultraopenai/gpt-5.6-terra=maxopenai/gpt-5.6-terra=ultraopenai/gpt-5.6-luna=maxopenai/gpt-5.6-sol=ultraDocker run passed through the Gateway and Codex app-server.node scripts/check-changed.mjspnpm buildmodel/listprojects preset effort lists unchanged,turn/startforwards effort into thread settings, and Ultra maps to Max only at the OpenAI request boundary.Exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/32332478352
No UI source changed, so screenshot evidence is not applicable; the real Gateway session selection and outgoing app-server lifecycle effort were asserted directly.