Skip to content

fix: preserve GPT-5.6 Max and Ultra through Codex - #126492

Merged
steipete merged 7 commits into
mainfrom
steipete/codex-runtime-thinking-compat
Aug 20, 2026
Merged

steipete merged 7 commits into
mainfrom
steipete/codex-runtime-thinking-compat

Conversation

@steipete

@steipete steipete commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Real OpenAI API-key + Codex 0.147.0 reproduction before the fix: Sol succeeded through XHigh, but Sol Max reached app-server with effort: null.
  • Real OpenAI API-key + Codex app-server validation passed all affected selectors:
    • openai/gpt-5.6-sol=max
    • openai/gpt-5.6-sol=ultra
    • openai/gpt-5.6-terra=max
    • openai/gpt-5.6-terra=ultra
    • openai/gpt-5.6-luna=max
  • After addressing the ClawSweeper findings, an additional exact-tree real-key openai/gpt-5.6-sol=ultra Docker run passed through the Gateway and Codex app-server.
  • Lower Sol selectors from Off through XHigh were already proven live on the same real-key route; the repair preserves those paths.
  • Focused Vitest coverage passed for command selection, prepared catalog hydration, harness catalog merging, provider-versus-harness route ownership, final route/harness guards, attempt forwarding, authoritative session projection, stale-selection clamping, reset/model-switch invalidation, lifecycle inheritance, SDK privacy, and OpenAI exact-model resolution.
  • node scripts/check-changed.mjs
  • Final scoped changed gate for the post-review provenance edits.
  • pnpm build
  • Fresh branch autoreview: clean, no accepted/actionable findings.
  • Dependency contract checked against Codex 0.147.0: model/list projects preset effort lists unchanged, turn/start forwards 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.

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling extensions: openai size: L maintainer Maintainer-authored PR labels Aug 20, 2026
@steipete
steipete marked this pull request as ready for review August 20, 2026 00:24
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 7c060706f4ff4090e4a0e606987ca6908fe73223:

  • Real OpenAI API-key + Codex app-server matrix passed Sol Max, Sol Ultra, Terra Max, Terra Ultra, and Luna Max.
  • Focused regressions passed for prepared catalog hydration, harness capability merge, exact-model preservation, final model/harness/route scoping, attempt forwarding, and persisted session projection.
  • node scripts/check-changed.mjs passed after refreshing the post-rebase dependency install.
  • pnpm build passed on the rebased source and regenerated plugin boundary artifacts.
  • Exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/32317942379
  • Fresh exact-branch autoreview was clean with no accepted/actionable findings.

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.

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 12:41 AM ET / 04:41 UTC.

ClawSweeper review

What this changes

Carries 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 provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep 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
Reviewed head: cbdd781c1e82611596b037003274d7c99054e55c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong reported live proof and focused coverage support the repair, while the required upstream-contract and current-main review remain incomplete in this checkout.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.
Evidence reviewed 7 items Prepared capability owner: The selected catalog entry is reduced to immutable provider/model/runtime/route-bound thinking metadata before an attempt is created.
Final execution guard: The embedded-run runtime applies that metadata only after the selected harness is known, and only when provider, model, runtime, and route still match.
Codex dependency signal: The Codex harness reads model-list reasoning efforts and sends the resolved effort in turn/start, so this PR depends on the pinned Codex protocol contract.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

runner@runnervmzvulz:/tmp/clawsweeper-live-proof-126492-uton7u/target$ pnpm openclaw --help
$ node scripts/run-node.mjs --help
pnpm openclaw --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 81.76 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.6s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 11.5s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 3495ms (slowest: built plugin control-plane loads 2745ms)

OpenClaw 2026.8.1 (cbdd781) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console (silent|fatal|error|w
… output truncated …

Assertions:

  • PASS expect_output: OpenClaw

How this fits together

OpenClaw 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]
Loading

Before merge

  • Resolve merge risk (P1) - This changes executable model metadata plus persisted session projection; a mismatch could silently downgrade effort, expose private state, or alter existing stored selections.
  • Resolve merge risk (P1) - Production code is reported as net +352 lines for a bug fix; the new durable provenance boundary needs maintainer scrutiny before accepting that growth.
  • Resolve merge risk (P1) - The required pinned Codex source and a current-main baseline were unavailable in this checkout, preventing independent contract and upgrade comparison.
  • Complete next step (P2) - A reviewer with access to the pinned Codex source and current-main history must complete the contract and upgrade checks; this review tree cannot supply either.
Agent review details

Security

None.

PR surface

Source +371, Tests +537, Other 0. Total +908 across 46 files.

View PR surface stats
Area Files Added Removed Net
Source 33 498 127 +371
Tests 12 635 98 +537
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 46 1135 227 +908

Review metrics

Metric Value Why it matters
Production versus test delta production +477/-125 (net +352); tests/test support +656/-100 (net +556) The bug repair adds durable session provenance and execution capability propagation, so the positive production growth needs owner-boundary review.

Stored data model

Persistent data-model change detected: serialized state: src/agents/session-model-auto-revert.ts, serialized state: src/agents/session-thinking-level-selection.ts, serialized state: src/agents/sessions/sdk.ts, serialized state: src/auto-reply/reply/session-reset-model.ts, serialized state: src/auto-reply/reply/session.ts, serialized state: src/config/sessions/session-entry-projection.ts, and 18 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete the Codex contract check (recommended)
    Before merge, inspect the pinned Codex 0.147.0 model-list and turn-start implementation and confirm the reported effort mappings against this exact head.
  2. Hold for a reproducible review environment
    Pause merge until a reviewer can compare this branch with current main and directly inspect the required Codex dependency source.

Technical review

Best 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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: A selected reasoning level can silently be omitted or downgraded on real Codex-backed GPT-5.6 turns.
  • merge-risk: 🚨 compatibility: The branch changes prepared model capability propagation and persisted session projection for existing model selections.
  • merge-risk: 🚨 auth-provider: The affected capability follows the OpenAI direct-route and Codex-harness routing boundary.
  • merge-risk: 🚨 session-state: The branch stores private reasoning-selection provenance and restores it across session fallback and reset flows.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and follow-up comments report an after-fix real OpenAI API-key/Codex app-server selector matrix and an exact-tree Sol Ultra Docker run; focused tests cover the final projection-only repair.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current branch and the related merged GPT-5.6 Codex catalog repair, establishing prior merged ownership of this behavior. (role: recent area contributor; confidence: medium; commits: 2e6457b8e6e3, cbdd781c1e82; files: src/agents/model-catalog-lookup.ts, src/gateway/session-utils-model.ts, extensions/codex/src/app-server/models.ts)

Rank-up moves

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

  • Have a reviewer with the pinned sibling Codex source complete the direct model-list and turn-start contract check.
  • Confirm exact-head CI completes green before merge.

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 (5 earlier review cycles)
  • reviewed 2026-08-20T00:43:53.178Z sha 7c06070 :: found issues before merge. :: [P1] Keep harness capabilities independent of provider route | [P1] Do not expose unsupported persisted effort as effective
  • reviewed 2026-08-20T01:24:53.167Z sha 7c06070 :: found issues before merge. :: [P1] Keep Codex capabilities route-free | [P1] Do not treat every stored effort as validated
  • reviewed 2026-08-20T02:29:02.288Z sha 4b6842a :: found issues before merge. :: [P1] Record CLI thinking selection provenance
  • reviewed 2026-08-20T02:56:09.833Z sha 57889bf :: found issues before merge. :: [P1] Preserve fallback capability metadata
  • reviewed 2026-08-20T03:35:31.121Z sha f51cecb :: found issues before merge. :: [P2] Keep selection provenance out of public fallback state

@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the latest ClawSweeper review on exact head 4b6842a3d9d44a79295c69260f6761883fce2302:

  • Harness capability route ownership: harness-derived capabilities no longer inherit a configured provider route. A focused regression now builds the capability from a Codex catalog row plus an explicit direct-provider configuration and proves the result remains route-free; final model and harness mismatch guards remain intact.
  • Persisted session effort validation: Gateway rows now preserve Ultra only when a private durable fact proves the exact provider/model/harness/level selection. Unproven legacy and stale cross-runtime values are clamped through the current catalog. The fact is stripped from public and Plugin SDK projections, follows lifecycle-preserved selections, participates in model-selection transactions, and is cleared by reset model hints that cannot revalidate it.
  • Direct Codex source review: rechecked the pinned Codex 0.147.0 model list, turn-start, thread settings, and final OpenAI request mapping contracts.
  • Proof: focused command/Gateway/picker/directive/lifecycle/plugin-boundary tests passed; complete changed gate passed; final scoped gate passed; pnpm build passed; fresh autoreview was clean. A new real OpenAI API-key Docker run of openai/gpt-5.6-sol=ultra passed through the Gateway and Codex app-server after these repairs.

Exact-head CI is attached and running.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the remaining ClawSweeper finding on exact head 57889bfb49163f5f75f1455dee8706f398e9ef68:

  • The CLI thinkOverride producer now records the same private provider/model/harness/level selection fact as the Gateway picker and directive paths before persisting the session row.
  • The command regression now asserts the complete fact alongside the explicit thinkingLevel, while the Gateway regression continues to prove that matching Codex Ultra is preserved and unproven state is clamped.
  • The focused command test, scoped changed gate, exact build, and fresh autoreview passed.
  • The pinned Codex source was directly rechecked: model/list projects preset efforts, turn/start.effort enters thread settings unchanged, and Ultra maps to Max only at the final OpenAI request boundary. Sol/Terra presets include Ultra; Luna stops at Max.

Exact-head CI is attached and running.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the cross-provider fallback finding on exact head f51cecbc273a159a97fe31c2f9f78ba7a9cd28fa:

  • Scoped thinking hydration is now local to each fallback candidate. Hydrating a Codex primary no longer replaces the shared multi-provider catalog consumed by later candidates.
  • A regression starts with a Codex GPT-5.6 primary, hydrates only that OpenAI candidate, then falls back to a second provider and proves its original capability metadata and XHigh selection remain available. It also proves no unnecessary scoped hydration runs for that already-resolved provider.
  • The focused test, scoped changed gate, exact build, and fresh autoreview passed. The final production delta decreased to net +320.
  • The pinned Codex source contract was directly rechecked in the sibling checkout; the dependency behavior is unchanged by this candidate-scoping repair.

Exact-head CI is attached and running.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Aug 20, 2026
@steipete
steipete force-pushed the steipete/codex-runtime-thinking-compat branch from f51cecb to cbdd781 Compare August 20, 2026 04:36
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed every item from the latest ClawSweeper review on rebased head cbdd781c1e82611596b037003274d7c99054e55c:

  • Nested fallback privacy: rollback provenance now uses an internal fallback type. The shared public session projector strips prevThinkingLevelSelection, and both Gateway patch-result and Plugin SDK entry/patch regressions prove it is not observable.
  • Freshness: rebased the complete stack onto current main before the final validation cycle. Main advanced again afterward, but GitHub reports the PR mergeable and repository policy does not require chasing a moving base after a clean rebase.
  • Codex contract: directly rechecked the sibling Codex source for GPT-5.6 presets, model/list, turn/start.effort, thread settings, and the final Ultra-to-Max request mapping.
  • Proof: 15 focused regression files passed across 10 Vitest shards; the complete changed gate passed; pnpm build passed; fresh branch autoreview was clean. The earlier real OpenAI API-key matrix and post-review Sol Ultra run remain applicable because this final repair only narrows public projection.

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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Aug 20, 2026
@steipete
steipete merged commit efc33f8 into main Aug 20, 2026
241 checks passed
@steipete
steipete deleted the steipete/codex-runtime-thinking-compat branch August 20, 2026 04:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations extensions: openai gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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.

1 participant