Skip to content

fix(codex): restore GPT-5.6 reasoning effort options - #126182

Merged
steipete merged 3 commits into
mainfrom
steipete/vibrant-borg-2f2269
Aug 19, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/vibrant-borg-2f2269

Conversation

@steipete

@steipete steipete commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #126005

What Problem This Solves

Fixes an issue where users running GPT-5.6 through the native Codex runtime could see only High in the chat effort control when account-scoped model discovery returned an incomplete capability row.

The regression also affected models.list, sessions.list, /think validation, and sessions.patch, so the missing options could not be repaired safely in the Control UI alone.

Why This Change Was Made

Codex model/list has two distinct identities: a stable public model ID and the execution model used in app-server requests. OpenClaw collapsed them into one catalog key, then let account-scoped compatibility metadata overwrite the provider-owned capability profile.

This change keeps the stable ID as the public catalog/session identity, carries the execution identity only as private prepared runtime metadata, and merges account inventory with provider-owned complete reasoning capabilities. Explicit empty observations remain authoritative, while partial non-empty observations can no longer erase known effort levels. Normal turns, side questions, and bounded turns all use the execution identity for Codex requests without exposing it in transcript attribution, lifecycle events, model status, or public Gateway projections.

The upstream contract was verified directly in Codex: Model exposes distinct id and model fields, and the app-server projects both from the selected preset in models.rs.

Provenance: #124829 introduced the account-scoped harness catalog adapter (code/PR author @hannesrudolph; squash merged by @steipete on 2026-08-18). That reopened the partial-capability regression previously repaired in #121865.

AI-assisted: yes; the implementation and proof were reviewed and understood before submission.

Production LOC: +92/-29 (net +63) | Tests: +154/-17 (net +137). The production growth establishes one explicit logical/execution identity boundary and applies it across the invariant-sharing Codex request paths; the first implementation was reduced by deleting a redundant thread-rotation path and 121 lines before submission.

User Impact

GPT-5.6 users get the complete supported effort range instead of a picker that stops at High. Existing sessions keep their stable public model identity, supported effort values validate consistently across UI and Gateway surfaces, and private app-server routing identities remain private.

Evidence

A live Codex app-server model/list probe on this host advertised the complete six native GPT-5.6 efforts. The repaired catalog preserved the stable public ID and projected:

low, medium, high, xhigh, max, ultra

The deterministic Control UI browser flow reproduces the damaged input and the repaired profile:

Before: partial capability row After: complete capability profile
Effort picker with only Off and High Effort picker with seven ordered stops

Browser assertions verified the slider changed from 2 stops (off,high) to 7 ordered stops (off,low,medium,high,xhigh,max,ultra). Both screenshots were inspected after capture.

Focused and owner-boundary proof:

  • Final catalog/bounded/runtime suite: 596 tests passed across the generic harness catalog and seven Codex files.
  • Post-simplification lifecycle suite: 152 tests passed.
  • node scripts/check-changed.mjs: passed after a single pnpm install refresh repaired an unrelated transient Reef workspace-module resolution failure.
  • Exact-head CI: run 32217883046 passed with all required checks green.
  • The first CI head exposed two omitted Codex sibling cases (missing prepared-model fallback and web-search result attribution); both were repaired and the focused 69-test sibling suite passed before the green head was pushed.
  • pnpm build: passed on the final branch.
  • Structured Codex autoreview: clean, no accepted/actionable findings.
  • git diff --check: passed.

The original signed-in team dashboard was not re-driven because the local Chrome extension relay was unavailable. The changed producer was live-tested through the real Codex app-server catalog, and the shipped Control UI was exercised in a real Chromium flow with deterministic Gateway data.

Keep public model identities separate from app-server execution routing, and retain provider-owned complete effort metadata when account discovery is partial.

Fixes #126005
@clawsweeper

clawsweeper Bot commented Aug 19, 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 agents Agent runtime and tooling extensions: codex size: M maintainer Maintainer-authored PR labels Aug 19, 2026
@steipete
steipete marked this pull request as ready for review August 19, 2026 04:24
@steipete steipete self-assigned this Aug 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at exact head e992e4ae20ce8903eaf51b47fe894136da12d5a7. The catalog owner now preserves the stable public model ID, keeps the distinct Codex execution model private to app-server requests, and prevents partial account observations from erasing the provider-owned effort profile. Direct upstream source confirms the separate fields (codex-rs/app-server-protocol/src/protocol/v2/model.rs:92-104, codex-rs/app-server/src/models.rs:27-50).

Local final-head proof:

  • node scripts/run-vitest.mjs extensions/codex/harness.test.ts extensions/codex/src/app-server/bounded-turn.test.ts extensions/codex/src/app-server/model-catalog.test.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/codex/src/app-server/side-question.test.ts extensions/codex/src/commands.test.ts extensions/codex/src/web-search-provider.test.ts src/agents/harness/model-catalog.test.ts — 596 tests passed.
  • node scripts/run-vitest.mjs extensions/codex/src/app-server/thread-lifecycle.test.ts — 152 tests passed during simplification.
  • node scripts/run-vitest.mjs extensions/codex/src/commands.test.ts extensions/codex/src/web-search-provider.test.ts — 69 sibling tests passed after the initial CI omissions were repaired.
  • node scripts/check-changed.mjs, pnpm build, and git diff --check — passed.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output — clean; no accepted/actionable findings.

Hosted proof: CI 32217883046 and Workflow Sanity 32217883304 both passed on the exact head. OPENCLAW_TESTBOX=1 scripts/pr prepare-run 126182 completed in hosted_exact_or_recent_parent mode; Blacksmith Testbox, ARM Testbox, and Build Artifacts Testbox were explicitly not applicable, so there is no separate Testbox run/lease ID.

The real Codex app-server model/list probe confirmed the complete six-effort profile, and the inspected sanitized Chromium proof in the PR body shows the picker changing from 2 stops to 7 ordered stops. The initial CI head exposed two sibling expectations; the final commit repaired both and the current exact-head run is green. Known gap: the original signed-in team dashboard was not re-driven because the Chrome extension relay was unavailable; the real producer probe and deterministic real-browser Control UI flow cover the changed path. The latest ClawSweeper comment is an expired current-head review started placeholder with no published Rank-up moves:.

@steipete
steipete merged commit 2e6457b into main Aug 19, 2026
234 checks passed
@steipete
steipete deleted the steipete/vibrant-borg-2f2269 branch August 19, 2026 05:56
@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 20, 2026
* fix(codex): preserve model effort capabilities

Keep public model identities separate from app-server execution routing, and retain provider-owned complete effort metadata when account discovery is partial.

Fixes openclaw#126005

* refactor(codex): avoid redundant thread rotation

* fix(codex): preserve model fallbacks without leaking wire ids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: codex maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex catalog can collapse GPT-5.6 effort options to High

1 participant