Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-22 12:09 UTC / May 22, 2026, 8:09 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level: current main has the shared override flag, but OpenAI/Codex profiles do not set it, so a stale catalog PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land one canonical OpenAI/Codex provider-policy fix that consumes the already-merged shared flag, preserves catalog opt-outs for non-reasoning chat-latest rows, and closes the linked runtime issue after merge. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main has the shared override flag, but OpenAI/Codex profiles do not set it, so a stale catalog Is this the best way to solve the issue? Yes: the PR uses the provider-owned flag that already landed on main, keeps non-reasoning chat-latest catalog opt-outs intact, and adds focused coverage. The remaining choice is maintainer canonicalization versus the overlapping open branch, not a code defect in this patch. Label changes:
Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3551e9843392. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Sunspot Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Thanks for the review @clawsweeper — addressed both the P1 classifier bug and the runtime-proof ask. Pushed P1 fix: suffix-aware chat-latest classifierThe previous revision matched
I cross-checked against the bundled catalog (
New regression-guard tests added in both Runtime probe output (the proof ask)I ran the patched OpenAI thinking-policy module directly via a Node probe ( End-to-end resolver behavior (the actual A redacted SDK contract decisionRe: the maintainer ask on
The current shape lines up with PR #84902's direction, so if there's agreement on the contract there I'll converge on it here. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI run https://github.com/openclaw/openclaw/actions/runs/26278881389 failed None of those three files are touched by this PR. The cycle was introduced by upstream commit Pushed
Verification on the rebased branch: Happy to split Pinging @vincentkoc since the cycle was introduced in |
|
CI summary on
Restructured the Ready for human review. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Rebased onto the latest Verified post-rebase on
PR is back to |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Post-rebase CI: ✅ 72 pass / 28 skipping / 0 fail. |
|
@clawsweeper hatch |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper hatch |
|
🦞👀 Command router queued. I will update this comment with the next step. |
…alog reasoning=false Subagent spawns and `/think` validation reject non-off thinking on canonical `openai/*` and `openai-codex/*` GPT-5 reasoning models when a stale catalog entry has `reasoning: false` (issue #84880). `resolveThinkingProfile` was short-circuiting to off-only on `reasoning === false` before consulting the provider plugin profile, so persisted catalogs that lagged behind the runtime augmentation forced "Use one of: off." even for models the provider knows support high/xhigh. Introduce an `overridesCatalogReasoning?: boolean` flag on `ProviderThinkingProfile`. When a provider plugin returns a profile with this flag set, the resolver treats the plugin as the canonical source for that model and uses its level list ahead of the catalog opt-out. Providers opt in per model, so non-reasoning models (e.g. `openai/chat-latest`) still honor catalog `reasoning: false`. The OpenAI extension opts in for GPT-5 reasoning model refs (`gpt-5`, `gpt-5.5`, `gpt-5.4`, `gpt-5.3`, `gpt-5.2`, codex variants, mini/nano/pro, o1/o3/o4 series); chat-latest variants are explicitly excluded so their off-only behavior is preserved. The shared `buildOpenAIThinkingProfile` carries the flag, so both `openai` and `openai-codex` providers benefit. Tests cover the acceptance criteria from the issue: - `sessions_spawn(model="openai/gpt-5.4", thinking="high")` accepted - `sessions_spawn(model="openai-codex/gpt-5.5", thinking="high")` accepted - `sessions_spawn(model="openai-codex/gpt-5.5", thinking="xhigh")` accepted - Non-reasoning OpenAI models (chat-latest) still off-only on stale catalog `reasoning: false` - Non-authoritative provider profiles still defer to catalog opt-out
…g policy ClawSweeper review on PR #85285 flagged that the prior revision matched `gpt-5.3-chat-latest` via the `gpt-5.3` reasoning prefix, which would have flipped a bundled catalog `reasoning: false` row to the authoritative override path. The bundled catalog has two non-reasoning chat-latest variants (`gpt-5-chat-latest`, `gpt-5.3-chat-latest`) and two reasoning chat-latest variants (`gpt-5.1-chat-latest`, `gpt-5.2-chat-latest`), so the rule cannot be "all chat-latest is non-reasoning." Restructure the classifier to be suffix-aware: any `*-chat-latest` model is treated as catalog-authoritative (no override) unless it appears in the explicit `OPENAI_REASONING_CHAT_LATEST_MODEL_IDS` opt-in list. This preserves the catalog opt-out for current and future non-reasoning chat-latest variants while still letting the two genuine reasoning chat-latest models override stale rows. Tests now cover: - gpt-5.3-chat-latest stays off-only on stale catalog reasoning=false - gpt-5-chat-latest, chat-latest still off-only (preserved behavior) - gpt-5.1-chat-latest, gpt-5.2-chat-latest get overridesCatalogReasoning=true
|
Rebased onto current #85300 introduced the same opt-in profile flag I had added — under the name
Two-commit branch:
Local verification on rebased head:
|
|
Post-rebase CI: ✅ 73 pass / 23 skipping / 0 fail (96 total). |
|
🦞👀 I queued a comment sync for this PR. If the egg is hatchable, ClawSweeper will generate the image once and update the existing review comment. |
|
@clawsweeper re-review Proof block rewritten to match the rebased patch:
Verification: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper hatch |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Withdrawing — the actual root cause of #84880 was config-side, not bundled catalog. Closing. Full analysis in #84880 follow-up comment. Short version: My user's The bundled OpenAI plugin catalog in The flag pattern itself is still valid (upstream #85300 introduced it for a real Gemini 3 catalog gap), just not needed for OpenAI today. Thanks @clawsweeper and reviewers — sorry for the cycle. |
|
Withdrawing — see comment above. Bundled OpenAI catalog is correct; the bug was triggered by user-config strip via mergeProviderModels, fixed by removing incomplete user-config entries (not by this PR's flag). |

Summary
Fixes #84880. Subagent spawns and
/thinkvalidation reject non-offthinking on canonicalopenai/*andopenai-codex/*GPT-5 reasoning models when a stale catalog entry hasreasoning: false.resolveThinkingProfileshort-circuits to off-only onreasoning === falsebefore consulting the provider plugin profile, so persisted catalogs that lag behind runtime augmentation forceUse one of: off.even for models the provider knows supporthigh/xhigh.The opt-in profile flag (
preserveWhenCatalogReasoningFalse) and theresolveThinkingProfilereordering already landed in upstream PR #85300 for the Gemini 3 cron-thinking fix. This PR builds on that infrastructure: it applies the same flag to the OpenAI extension for the GPT-5 reasoning model set and explicitly excludes non-reasoning chat-latest variants. The classifier is suffix-aware: any*-chat-latestmodel is catalog-authoritative unless it appears in the explicitOPENAI_REASONING_CHAT_LATEST_MODEL_IDS = ["gpt-5.1-chat-latest", "gpt-5.2-chat-latest"]opt-in list (matches bundled catalog reasoning flags inextensions/openai/openclaw.plugin.json).Real behavior proof
Behavior or issue addressed:
sessions_spawn(model="openai-codex/gpt-5.5", thinking="high"|"xhigh")andsessions_spawn(model="openai/gpt-5.4", thinking="high")are rejected withThinking level "high" is not supported for openai/gpt-5.5. Use one of: off.even though the canonical OpenAI/Codex catalog lists these models as reasoning-capable — see live v2026.5.20 repro logs in issue #84880. With #85300's resolver reordering in place, this PR flips the relevant OpenAI / OpenAI-Codex profiles to authoritative (viapreserveWhenCatalogReasoningFalse: true) so they win over stale persisted catalogreasoning: falserows.Real environment tested: macOS 25.5.0 (Darwin arm64), Node 24.13.0, pnpm 11.1.0; repository checked out at
fix/subagent-thinking-overrides-catalog-reasoninghead890ebf8crebased onorigin/main77a1b762(which already contains #85300). Runtime probe drives the patched modules end-to-end through the sameresolveOpenAIThinkingProfile/resolveOpenAICodexThinkingProfileentry points that the live Gateway calls on everysessions_spawnvalidation insrc/auto-reply/reply/get-reply-run.tsandsrc/agents/subagent-spawn.ts.Exact steps or command run after this patch:
The probe is a small driver script that imports the patched
extensions/openai/thinking-policy.tsand calls the classifier for each acceptance scenario from #84880 plus the chat-latest regression guards from the ClawSweeper P1 review, then checks the resolvedlevels[]andpreserveWhenCatalogReasoningFalseflag against expected values.Evidence after fix: Live terminal output from
node --import tsx probe-thinking.mjsafter applying the patch — copied verbatim, no redaction needed since the probe data is synthetic:Observed result after fix: 12/12 probes pass. For the canonical GPT-5 reasoning model refs the patch flips
preserveWhenCatalogReasoningFalsetotrueand surfaces the full[off, minimal, low, medium, high]level set (plusxhighon the appropriate models), so a stale catalog row markedreasoning: falseno longer triggers the off-only short-circuit. For non-reasoning chat-latest variants (chat-latest,gpt-5-chat-latest,gpt-5.3-chat-latest) and legacy non-reasoning models (gpt-4.1) the classifier returnspreserveWhenCatalogReasoningFalse=false, so a stale catalogreasoning: falserow still wins and the runtime keeps the off-only path documented by the catalog opt-out.Cross-check against the bundled
extensions/openai/openclaw.plugin.jsonshows the classifier verdict matches the catalog truth for every chat-latest variant in the bundle:gpt-5-chat-latestfalsegpt-5.1-chat-latesttruefalsegpt-5.2-chat-latesttruefalsegpt-5.3-chat-latestfalsechat-latestfalsegpt-5.5,gpt-5.4,gpt-5-codex,o3-mini, …truefalsegpt-4.1,gpt-4o, …falseWhat was not tested: A redacted
sessions_spawnlive run against a custom-built Gateway binary in my deployment — the probe exercises the same classifier and resolver entry points the live Gateway calls, but I did not build and install a custom Gateway binary into my OrbStack VM for this PR. Also out of scope: the Ollama Cloud variant raised by @SplyzerRB in #84880 where the subagent ignores explicitthinking: "off"— that path forwardsthinkingeven when the spawn arg isoffand is a separate runtime bug that does not share a code path with the OpenAI/Codex catalog-override issue this PR fixes.What changes
extensions/openai/thinking-policy.ts— suffix-aware classifier for chat-latest variants; flags reasoning model refs as authoritative viaisOpenAIReasoningModelId, settingpreserveWhenCatalogReasoningFalseon the returned profile.extensions/openai/openai-provider.test.ts— coverage for the four [Bug]: subagent thinking still rejects non-off on v2026.5.19; previous #84706 was closed against unrelated doctor migration #84880 acceptance scenarios, the three ClawSweeper P1 chat-latest regression guards (chat-latest,gpt-5-chat-latest,gpt-5.3-chat-lateststay non-authoritative), and the two explicit reasoning chat-latest opt-ins (gpt-5.1-chat-latest,gpt-5.2-chat-latest).src/auto-reply/thinking.test.ts— resolver-level coverage that authoritative provider profiles override stale catalogreasoning: false, while non-authoritative profiles still defer to the catalog opt-out.docs/tools/thinking.mdanddocs/plugins/sdk-migration.md— document the opt-in flag.The opt-in flag itself (
preserveWhenCatalogReasoningFalseonProviderThinkingProfile) and theresolveThinkingProfilereordering are already present inmainvia upstream PR #85300. This PR no longer touchessrc/plugins/provider-thinking.types.tsorsrc/auto-reply/thinking.tsruntime — it consumes the existing flag from the OpenAI extension.Verification
pnpm check:architecture— clean (0 import cycles).pnpm tsgo:all— clean.pnpm vitest run src/auto-reply/thinking.test.ts extensions/openai/openai-provider.test.ts— 63/63 tests pass.