Skip to content

fix(codex): Pro model first turns fail when reasoning defaults to minimal#101484

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
zhangguiping-xydt:fix/problem-codex-pro-reasoning-minimal
Jul 7, 2026
Merged

fix(codex): Pro model first turns fail when reasoning defaults to minimal#101484
vincentkoc merged 1 commit into
openclaw:mainfrom
zhangguiping-xydt:fix/problem-codex-pro-reasoning-minimal

Conversation

@zhangguiping-xydt

@zhangguiping-xydt zhangguiping-xydt commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Codex Pro turns that start from OpenClaw's lower thinking levels. gpt-5.5-pro and gpt-5.4-pro accept medium, high, and xhigh, so sending the generic modern-model low fallback can reject the first app-server request.

Why This Change Was Made

The submitted patch added the Pro ids to the existing minimal to low predicate. Maintainer review found that this still emitted an unsupported effort and also coupled model classification to one fallback translation.

The repaired implementation gives both Pro models one provider-owned fallback contract: medium, high, and xhigh. The provider thinking profile and app-server request path share that contract when live model metadata is unavailable. Live app-server metadata remains authoritative, and Pro models remain classified as modern.

Official model contracts:

User Impact

When metadata is unavailable, minimal and low requests for either Pro model now clamp to medium; max clamps to xhigh. Other modern-model and legacy-model behavior is unchanged.

Evidence

Focused local proof:

Test Files  2 passed (2)
Tests       104 passed (104)

Testbox-through-Crabbox:

provider: blacksmith-testbox
lease: tbx_01kwxzcqc0ah5kegxbk6b73z8p
focused Codex tests: 104 passed
pnpm build: passed
pnpm check:changed: passed

Fresh autoreview completed with no accepted or actionable findings. A live entitled Codex Pro network turn was not available; the focused tests exercise both the provider profile and the exact app-server request resolver.

@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 6:12 AM ET / 10:12 UTC.

Summary
The PR adds a Codex Pro reasoning-effort fallback contract for gpt-5.5-pro and gpt-5.4-pro, applies it to provider thinking profiles and app-server turn effort resolution, and adds focused regression tests.

PR surface: Source +21, Tests +40. Total +61 across 4 files.

Reproducibility: yes. at source level: current main omits the two Pro ids from both the modern-model predicate and any Pro-specific fallback, so metadata-missing Pro first turns can still send minimal. I did not run a live Pro turn because the PR discussion says entitlement was unavailable.

Review metrics: 1 noteworthy metric.

  • Codex Pro fallback contract: 2 model ids added, 1 shared fallback helper. The quantified fallback surface matters because metadata-missing gpt-5.5-pro and gpt-5.4-pro turns now clamp lower thinking requests to the documented supported range.

Stored data model
Persistent data-model change detected: vector/embedding metadata: extensions/codex/provider.test.ts, vector/embedding metadata: extensions/codex/src/app-server/thread-lifecycle.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add a redacted live Codex Pro first-turn log if an entitled account becomes available before merge.

Risk before merge

  • [P1] A live entitled Codex Pro network turn was not available, so final runtime confidence rests on the official model contract, upstream protocol source, and focused resolver/test proof rather than a real Pro account turn.

Maintainer options:

  1. Decide the mitigation before merge
    Land the repaired fallback after ordinary maintainer merge checks, keeping live app-server metadata authoritative and using the medium/high/xhigh Pro contract only when metadata is unavailable.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed because the current PR head already contains the focused maintainer-repaired implementation and no actionable review finding remains.

Security
Cleared: No concrete security or supply-chain concern found; the diff only changes Codex provider/runtime model-effort fallback logic and focused tests.

Review details

Best possible solution:

Land the repaired fallback after ordinary maintainer merge checks, keeping live app-server metadata authoritative and using the medium/high/xhigh Pro contract only when metadata is unavailable.

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

Yes, at source level: current main omits the two Pro ids from both the modern-model predicate and any Pro-specific fallback, so metadata-missing Pro first turns can still send minimal. I did not run a live Pro turn because the PR discussion says entitlement was unavailable.

Is this the best way to solve the issue?

Yes. Sharing one provider-owned fallback helper between resolveThinkingProfile and the app-server request resolver is narrower and safer than only adding the Pro ids to the modern predicate, which would still emit unsupported low.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a focused Codex provider/runtime bug fix for metadata-missing Pro turns with limited blast radius and targeted regression coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body and maintainer comment provide terminal/Testbox proof for the exact resolver path, build, changed checks, and autoreview; a live entitled Codex Pro turn remains unavailable and is tracked as residual risk.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and maintainer comment provide terminal/Testbox proof for the exact resolver path, build, changed checks, and autoreview; a live entitled Codex Pro turn remains unavailable and is tracked as residual risk.
Evidence reviewed

PR surface:

Source +21, Tests +40. Total +61 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 32 11 +21
Tests 2 44 4 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 76 15 +61

What I checked:

  • Repository policy read: Read the full root AGENTS.md and the scoped extensions/AGENTS.md; the review applied the Codex dependency-inspection gate, extension boundary guidance, best-fix review loop, and compatibility-sensitive fallback review policy. (AGENTS.md:1, 079a704dda76)
  • Live PR state: Live GitHub data shows the current head is 34baea4, authored by the contributor with Vincent Koc as co-author, assigned to vincentkoc, and touching the four Codex files in the provided diff. (34baea4763ee)
  • Current main reproduces the missing fallback by source inspection: Current main reads app-server supportedReasoningEfforts when present but, when metadata is absent, resolveReasoningEffort only maps minimal through isModernCodexModel; current main's modern predicate omits both Pro ids, so gpt-5.5-pro and gpt-5.4-pro keep minimal. (extensions/codex/src/app-server/thread-lifecycle.ts:1879, b9a3db13f130)
  • Current main predicate omits Pro ids: On current main, isModernCodexModel recognizes GPT-5.6, GPT-5.5, GPT-5.4, GPT-5.4-mini, and GPT-5.3 Codex Spark, but not gpt-5.5-pro or gpt-5.4-pro. (extensions/codex/provider.ts:343, b9a3db13f130)
  • PR head adds one shared Pro fallback contract: The PR head defines GPT_5_PRO_REASONING_EFFORTS as medium/high/xhigh, exposes resolveCodexFallbackReasoningEfforts, uses it before generic fallback thinking levels, and still keeps the two Pro ids classified as modern. (extensions/codex/provider.ts:38, 34baea4763ee)
  • PR head applies the fallback to the app-server turn path: The PR head keeps metadata authoritative, then applies the provider fallback contract before the generic minimal to low modern-model translation, so lower Pro requests clamp to medium and max clamps to xhigh when metadata is unavailable. (extensions/codex/src/app-server/thread-lifecycle.ts:1872, 34baea4763ee)

Likely related people:

  • vincentkoc: The live PR is assigned to vincentkoc, the current head is co-authored by him, and the PR discussion says he pushed the maintainer repair and validation for this exact fallback contract. (role: recent repair contributor and likely follow-up owner; confidence: high; commits: 34baea4763ee, 5c3469549159, 77012f980785; files: extensions/codex/provider.ts, extensions/codex/src/app-server/thread-lifecycle.ts, extensions/codex/src/app-server/thread-lifecycle.test.ts)
  • steipete: Recent Codex app-server history shows steipete carried the GPT-5.6/Codex metadata-aware reasoning-effort resolver work and a major same-module lifecycle refactor shortly before this PR. (role: recent area contributor; confidence: high; commits: c52583a02270, 554d772c1a83, 33c0cd1378fc; files: extensions/codex/provider.ts, extensions/codex/provider-catalog.ts, extensions/codex/src/app-server/thread-lifecycle.ts)
  • hclsys: Commit c5c40b2 introduced the model-aware minimal to low translation for modern Codex models and the original focused regression tests for the same resolver path. (role: introduced current modern-model fallback behavior; confidence: medium; commits: c5c40b22afac; files: extensions/codex/provider.ts, extensions/codex/src/app-server/thread-lifecycle.ts, extensions/codex/src/app-server/thread-lifecycle.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (2 earlier review cycles)
  • reviewed 2026-07-07T08:33:37.224Z sha 4f2c080 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-07T09:06:02.791Z sha b14d179 :: needs maintainer review before merge. :: none

@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. P2 Normal backlog priority with limited blast radius. labels Jul 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added extensions: codex size: XS size: S docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime and removed size: XS labels Jul 7, 2026
@openclaw-barnacle openclaw-barnacle Bot removed channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling channel: feishu Channel integration: feishu labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants