Repository navigation
fix(codex): preserve cache when reasoning effort changes - #182397
Conversation
Enable native Codex reasoning-effort history controls for managed threads, while retaining model eligibility and explicit opt-out. Prove the native wire request stays append-only across effort changes. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: fd27139a-d686-43c2-b8d7-8afee77f2434
|
🦞👀 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. |
Review removal on 2026-11-07 only after the minimum supported Codex release defaults the feature on and native compatibility tests retain explicit opt-out and unsupported-model behavior. The date does not change runtime behavior. Co-authored-by: vincentkoc <[email protected]>
Regenerate the native thread start and resume request snapshots for the enabled reasoning-effort override. Only the expected config fields and derived diff hashes/offsets change. Co-authored-by: vincentkoc <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesEnable Codex’s existing history-scoped reasoning-effort updates for managed threads. Example: A supported native Codex conversation changes thinking level from low to high to medium.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused change using Codex’s existing reasoning controls, with no concrete introduced defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin translates OpenClaw thread and turn settings into app-server requests; Codex owns model eligibility, history updates, and provider serialization. flowchart LR
A[OpenClaw thinking selection] --> B[Codex thread configuration]
B --> C[Native Codex app server]
C --> D[Model eligibility]
D --> E[Conversation history]
E --> F[Responses request]
Technical reviewBest possible solution: Keep the shared thread-config opt-in and let Codex retain ownership of eligibility, effort pinning, and replay. Do we have a high-confidence way to reproduce the issue? Current main omits the feature flag while bundled Codex defaults it off; the supplied native regression captures the resulting request-effort changes, but no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete integration change: enable the existing native mechanism at the shared configuration owner and retain independent compatibility cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee855ce57341. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +156, Docs +4. Total +165 across 7 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 24, 2026, 4:38 AM ET / 08:38 UTC (Revision 2). |
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 946e9fa6-b7df-4ba1-bae5-e07a6d3d73bb
|
The reviewed head was The patch does not change OpenClaw storage schemas, migrations, Codex dependency version, or the native history format. The existing bundled Codex 0.162.1 already owns the same configuration-update representation and replay; it also has native resume coverage in Also added the requested cleanup review condition for 2026-11-07, and regenerated the two native request snapshot artifacts responsible for the initial CI failure. Updated-head snapshot checks pass. No automatic date-based disabling or guessed version gate was introduced. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Preserve the requested review date and removal condition without a forbidden TODO marker. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: c0355f8e-3516-4740-9e05-c45ee9c8a21b
|
Merged via squash auto-merge.
|
Align the bounded media thread assertions with the intentional reasoning-effort override introduced in #182397. Retain the exact configuration comparison and all bounded-thread restrictions. Validation: both affected tests reproduce the missing-field failure on the base; all 15 media-provider tests pass with the corrected expectation. No production behavior changes.
…2397) * fix(codex): preserve cache when reasoning effort changes Enable native Codex reasoning-effort history controls for managed threads, while retaining model eligibility and explicit opt-out. Prove the native wire request stays append-only across effort changes. Co-authored-by: vincentkoc <[email protected]> * fix(codex): preserve cache when reasoning effort changes Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: fd27139a-d686-43c2-b8d7-8afee77f2434 * docs(codex): bound reasoning override cleanup review Review removal on 2026-11-07 only after the minimum supported Codex release defaults the feature on and native compatibility tests retain explicit opt-out and unsupported-model behavior. The date does not change runtime behavior. Co-authored-by: vincentkoc <[email protected]> * test(codex): refresh reasoning feature request snapshots Regenerate the native thread start and resume request snapshots for the enabled reasoning-effort override. Only the expected config fields and derived diff hashes/offsets change. Co-authored-by: vincentkoc <[email protected]> * Publish openclaw/x-2113899049841799180-codex-reasoning-cache Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 946e9fa6-b7df-4ba1-bae5-e07a6d3d73bb * docs(codex): use lint-compatible cleanup review note Preserve the requested review date and removal condition without a forbidden TODO marker. Co-authored-by: vincentkoc <[email protected]> * Publish openclaw/x-2113899049841799180-codex-reasoning-cache Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: c0355f8e-3516-4740-9e05-c45ee9c8a21b --------- Co-authored-by: vincentkoc <[email protected]>
Align the bounded media thread assertions with the intentional reasoning-effort override introduced in openclaw#182397. Retain the exact configuration comparison and all bounded-thread restrictions. Validation: both affected tests reproduce the missing-field failure on the base; all 15 media-provider tests pass with the corrected expectation. No production behavior changes.
* fix(codex): preserve cache when reasoning effort changes Enable native Codex reasoning-effort history controls for managed threads, while retaining model eligibility and explicit opt-out. Prove the native wire request stays append-only across effort changes. Co-authored-by: vincentkoc <[email protected]> * fix(codex): preserve cache when reasoning effort changes Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: fd27139a-d686-43c2-b8d7-8afee77f2434 * docs(codex): bound reasoning override cleanup review Review removal on 2026-11-07 only after the minimum supported Codex release defaults the feature on and native compatibility tests retain explicit opt-out and unsupported-model behavior. The date does not change runtime behavior. Co-authored-by: vincentkoc <[email protected]> * test(codex): refresh reasoning feature request snapshots Regenerate the native thread start and resume request snapshots for the enabled reasoning-effort override. Only the expected config fields and derived diff hashes/offsets change. Co-authored-by: vincentkoc <[email protected]> * Publish openclaw/x-2113899049841799180-codex-reasoning-cache Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 946e9fa6-b7df-4ba1-bae5-e07a6d3d73bb * docs(codex): use lint-compatible cleanup review note Preserve the requested review date and removal condition without a forbidden TODO marker. Co-authored-by: vincentkoc <[email protected]> * Publish openclaw/x-2113899049841799180-codex-reasoning-cache Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: c0355f8e-3516-4740-9e05-c45ee9c8a21b --------- Co-authored-by: vincentkoc <[email protected]> Bounded beta.5 adaptation: enable the native reasoning-effort default before authored config so explicit opt-out and forced safety flags survive. Preserve richer baseline code and prompt snapshots; regenerate only exact current snapshot changes. Include native supported/unsupported/opt-out wire proofs, code-mode enabled/disabled config controls and correct database-broker routing. No runtime expiry, unsupported eligibility override, custody grant or release qualification claim. (cherry picked from commit 00c611d) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes native Codex conversations rebuilding their request-level reasoning configuration when users change thinking level between turns. The built-in OpenAI Responses runtime already supports eligible cache-preserving changes; the bundled Codex 0.162.1 still defaults its native feature off.
User Impact
Managed native Codex threads can use history-scoped reasoning changes on models whose Codex catalog supports them, including with native code mode disabled. Unsupported models and an explicit thread-config opt-out retain ordinary request-level effort. There is no dependency, schema, permission, or public configuration change.
The isolated live Gateway acceptance now passes with GPT-6.1 Sol and API-key authentication. Landing remains subject to exact-head CI and repository checks.
Why This Change Was Made
Enable Codex's existing reasoning_effort_override feature in the shared thread configuration, leaving eligibility, pinned effort, and replay entirely with Codex. This follows upstream Codex #56163. Latest stable 0.164.0 also has this flag off; upstream main enables it. Its prompt presets are a separate CLI feature and need no reasoning-cache adapter.
Requested by @vincentkoc, interpreting “opencai” in the original request as OpenAI.
Work sessions
Evidence
pnpm prompt:snapshots:checknow passes (6 files).Worked on by
View the OpenClaw team session