Skip to content

fix: preserve Ultra across model runtime boundaries - #135397

Merged
steipete merged 4 commits into
mainfrom
codex/gpt-ultra-parity
Sep 1, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/gpt-ultra-parity

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes cases where users select Ultra but lose its behavior across runtime boundaries: Codex turns without hydrated capability metadata could silently reduce it to a scalar API effort; subagents could inherit the parent's saved preference instead of its active level; and the Control UI could offer another runtime's Ultra option for the same model.

Why This Change Was Made

Codex OSS treats Ultra as an orchestration mode, not an extra Responses API effort. The native adapter preserves that mode and lets Codex choose the inference budget, with one shared effort selection for the two request fields. The shared attempt-tool-run-context forwards the logical level for embedded, Codex, and Copilot parents; the embedded-only forwarding line is removed. The separate Codex side-question tool factory forwards its resolved level, defaulting to Off. The UI resolves one runtime-scoped catalog entry for both options and defaults; the redundant effort wrapper and duplicate lookups are removed.

Compared directly against Codex OSS ade0ccacf9182e665cf784de041c51a79e35bc31: request-budget mapping, proactive orchestration selection, and active-turn child inheritance.

Production +83/-87 (net -4); tests +294/-101 (net +193); docs +8/-7. No new configuration, database schema, migration, dependency, or protocol fields. Existing native-model support gates, child-specific thinking defaults/overrides, native supervision settings, and tool-policy restrictions stay authoritative. Ordinary turns with hydrated native catalog metadata already avoided the clamp; this fixes the unhydrated paths rather than claiming all API-key turns were broken.

User Impact

Sol and Terra retain Ultra through the Codex adapter; native Luna remains capped at Max by its existing model profile. Children launched through OpenClaw sessions_spawn inherit the active parent thinking level across embedded, Codex, and Copilot runtimes, including one-shot Ultra and Off where supported, without changing the parent's persisted preference. Public /btw intentionally runs at Off even when its parent saved Ultra; its child tools now receive that resolved Off level. A Codex session no longer borrows an OpenClaw catalog's Ultra option/default when its own prepared metadata is absent. Thinking and Codex harness docs explain the runtime/budget distinction and active-turn inheritance.

Verified Merge and Latest-Main Proof

Merged through the normal repository workflow as ee9e22b5215fd69c0176852235999500bd1b7961. The exact source head, 8bee18ecc2c522c807bfa5c43d8051f495602d07, passed CI33555339065, including the required openclaw/ci-gate.

After merging, a fresh main pull resolved to ee9e22b. The following checks ran against that clean snapshot on September 1, 2026. Source HEAD and dist/build-info.json.commit matched before and after live execution.

Check Observed result
Full pnpm build Passed in 6m59s, including declarations, SDK export checks, runtime/postbuild guards and the Control UI build
Chromium reasoning/model-switch E2Es 14 passed across 2 files; fresh temporary production-config UI bundle, mocked Gateway, synthetic fixtures; source SHA recorded separately from the harness's synthetic build metadata
Native Codex Sol and Terra, Ultra Exact success markers; native effort and collaboration effort both ultra, multi-agent version v2
Native Codex Luna and Sol, Max Exact success markers; both native effort fields remained max
Native Codex Luna, explicit Ultra Rejected by existing admission policy; no native turn-context record created
Gateway ordinary Codex Sol turn Exact success marker; run-correlated native thread/turn records confirmed Sol with ultra in both effort fields
Gateway public /btw Visible BTW_ULTRA_OK side result, no error; parent retained saved Ultra

All four real parent/child cases passed:

Parent runtime/model Saved parent One-shot turn Recorded child Saved parent afterward
OpenClaw / Luna Medium Ultra Ultra Medium
OpenClaw / Luna Ultra Off Off Ultra
Codex / Sol Medium Ultra Ultra Medium
Codex / Sol Medium Off Off Medium

Each case created exactly one OpenClaw/Luna child. The actual sessions_spawn arguments omitted both thinking and model; the child completed with its exact marker, and that completion appeared in the parent conversation. Codex lifecycle events were correlated by run/session and native thread ID with newly appended native turn records: the Ultra parent used ultra/ultra; the Off parent used none/none.

The public /btw command's Off policy is source-confirmed; its native fork is ephemeral, so this run does not claim a measured native effort for that side question. SDK request-boundary tests separately cover explicitly requested Ultra side questions.

All latest-main proof commands exited successfully. The isolated Gateway port closed, known Gateway processes exited, and neither state directory had open handles before both temporary auth/runtime stores were removed. Redacted control metadata, logs and synthetic media were retained. The personal Gateway was not changed; the checkout remains clean on the tested main commit.

Runtime-mismatched UI: before / after

Real Chromium, mocked Gateway, synthetic data only. The fixture deliberately omits prepared native thinking metadata. The post-merge screenshot was inspected before upload; these images do not claim authenticated provider proof.

Before: Codex Luna borrows an OpenClaw catalog's Ultra profile.

Before: Codex Luna incorrectly inherits Ultra from another runtime

After, on tested main ee9e22b: the conflicting runtime catalog no longer supplies Ultra.

After on main: Codex Luna does not borrow Ultra from another runtime

Pre-merge regression checks, historical live evidence, and retained diagnostic failures

The final shared-context repair at fbaedcd5a56f36a04f2ad2bfd84eeca6bfb20237 closed the missing Codex factory forward found during review. Nine missing-field assertions failed before the fix: 2 Codex, 6 side-question, 1 Copilot. Afterward, 497 tests across 7 files / 5 shards, core and plugin-test types, formatting, core/plugin type-aware lint, and isolated Codex autoreview at the configured P0 threshold passed. The full 80-test side-question file passed; its diagnostic assertion was strengthened to check response success, not presented as a proven flake fix.

Plugin declaration preparation once rejected a changing boundary/topology; the unchanged serial retry passed. The original mutation remains unidentified. No guard was bypassed. Repaired-head authenticated Codex-parent Ultra/Off inheritance also passed before merge. The final 8bee18ecc2c5 commit only corrected the public /btw docs to say Off; production/tests were unchanged, and its separate formatting and isolated review passed.

Earlier CI33553058930 failed the unchanged CLI state-directory mismatch assertion near the existing three-second deadline; the log does not identify the handshake phase. One unchanged local five-file diagnostic repeat did not reach that assertion: its Gateway setup exceeded 120 seconds. It also hit a 100-second CLI startup guard with no output and a stale macOS respawn assertion (one bootstrap record instead of at least two). The repeat ended 55 passed, 2 failed, 3 skipped, plus a failed setup hook and is not counted as passing. The production gateway status policy deliberately avoids warning-only respawn; automatic extra-CA discovery is Linux-only. No timeouts, production policies, or assertions were changed to obtain green hosted CI.

The exploratory /btw delegated-child probe is also not counted as an end-to-end pass. It observed an Off child completing with BTW_CHILD_OFF_OK and an unchanged Ultra parent, but the ephemeral side conversation could not yield and return the child's completion. Its history did not expose spawn arguments, so their omission was not verified there. The limitation predates this thinking repair.

Historical integrated head 51f7d70014ab passed 601 focused tests, 14 Chromium scenarios, full build, changed-file checks and authenticated native/Gateway proof. Cleanup head 34bcfd89d036 removed a redundant comment and unsafe fixture casts without changing emitted production JavaScript; its 25 focused tests, types, formatting and isolated full-branch review passed. These counts overlap later checks and are not additive. Earlier unrelated CI failures included the auth-login type error fixed by #135407 and a worker-artifact timeout tracked in #135439.

The retained uncut 2× authenticated Control UI recording below is historical 51f7 proof, not the latest-main rerun. A real chat.send one-shot Ultra override produced an Ultra child and successful completion while the unmodified UI displayed the unchanged saved Medium parent preference. Actual spawn arguments omitted model and thinking. Synthetic data only; its isolated processes/state were cleaned up.

ultra-inheritance-2x.mp4

Follow-ups and Review Disposition

  • Audit one-shot Fast-mode inheritance separately; its child planner still rereads saved requester preferences. This PR does not change or claim to verify Fast mode.
  • Align Codex /btw delegated-child completion and yield guidance with its ephemeral lifecycle. Use the normal parent for asynchronous child completion; this repair does not add side-thread resume.
  • Make CLI state-directory fixtures record handshake failures and prove the matching-path case received hello metadata; retain the unidentified pre-output startup diagnostic, and make respawn tracing exercise a real trigger independently of platform CA discovery.

The final 20:49 UTC ClawSweeper review of 8bee18ecc2c5 reported no actionable correctness or security finding. Its unavailable-Codex-revision note concerned that worker's checkout: the exact cited ade0ccacf9182e665cf784de041c51a79e35bc31 exists in the lead's sibling checkout and was directly inspected before merge and rechecked afterward. Earlier Rank-up requests for repaired-head live inheritance proof and exact-head green CI are satisfied; the latest-main proof above is additional verification.

Keep native Codex Ultra as a runtime mode instead of clamping it against
physical Responses effort tiers. Share the selected collaboration effort
between turn fields and remove the redundant forwarding wrapper.

Carry the active parent thinking level through existing spawn context so
one-shot overrides reach native subagents without changing saved preferences.
Keep explicit child overrides and configured child defaults authoritative.

Scope Control UI thinking catalog fallback to the selected runtime, sharing
one prepared entry for picker options and the inherited default. Document
the native orchestration/budget boundary and active-turn inheritance.
@clawsweeper

clawsweeper Bot commented Sep 1, 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 docs Improvements or additions to documentation app: web-ui App: web-ui agents Agent runtime and tooling extensions: codex size: M maintainer Maintainer-authored PR labels Sep 1, 2026
@steipete
steipete marked this pull request as ready for review September 1, 2026 18:20
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 4:49 PM ET / 20:49 UTC.

ClawSweeper review

What this changes

The branch keeps Ultra as a Codex runtime mode through turn requests and child-agent spawning, prevents the Control UI from borrowing another runtime’s thinking profile, and updates focused tests and docs.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR remains necessary: current main does not contain its Ultra-preservation logic, and the reviewed patch has no supported correctness or security finding. It is maintainer-owned and should proceed through normal maintainer review rather than automated cleanup.

Priority: P2
Reviewed head: 8bee18ecc2c522c807bfa5c43d8051f495602d07

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative production repair with coherent boundary coverage and no actionable correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the submitted body nevertheless records authenticated Gateway and Control UI evidence, while focused source and contract review confirms the changed owners.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the submitted body nevertheless records authenticated Gateway and Control UI evidence, while focused source and contract review confirms the changed owners.
Evidence reviewed 6 items Codex runtime contract: Direct sibling-Codex inspection shows that the protocol accepts ultra as a reasoning effort and documents it as the selector for proactive multi-agent behavior; the core then maps Ultra to a model-owned request budget while retaining Ultra for orchestration.
Codex request owner: The changed resolver preserves Ultra before metadata-based scalar fallback, and the turn builder uses the same resolved value for both the turn effort and collaboration settings.
Active-turn inheritance path: Dynamic Codex and Copilot tool construction share the context producer, which now carries the active level into the spawn tool; child planning uses it ahead of stored session preference while preserving explicit child overrides and configured defaults.
Findings None None.
Security None None.

How this fits together

A user-selected thinking level flows from the Control UI and Gateway into the bundled Codex app-server, which starts model turns and builds tool context for child agents. The patch keeps that logical level coherent across those boundaries while the UI displays runtime-specific choices.

flowchart LR
  A[Control UI thinking choice] --> B[Gateway run preparation]
  B --> C[Codex app-server request]
  C --> D[Codex runtime turn]
  C --> E[Tool context]
  E --> F[Child-agent planner]
  F --> G[Inherited child thinking]
  D --> H[Model response]
Loading

Before merge

  • Resolve merge risk (P1) - The exact Codex revision cited in the PR body was unavailable in the local sibling checkout; direct inspection of available Codex commit 78c2908 confirms the relevant current protocol and runtime semantics, but not that historical revision byte-for-byte.
  • Complete next step (P2) - The PR is a current, maintainer-owned repair with no mechanical follow-up identified; normal human merge review remains the appropriate path.
Agent review details

Security

None.

PR surface

Source -4, Tests +193, Docs +1. Total +190 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 12 83 87 -4
Tests 9 293 100 +193
Docs 3 8 7 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 384 194 +190

Review metrics

Metric Value Why it matters
Production versus test delta production +83/-87; tests +293/-100; docs +8/-7 The repair is net-negative in production code while adding focused boundary coverage across the affected runtimes.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused owner-boundary repair after normal maintainer approval, preserving the shared active-turn context path and runtime-scoped UI catalog selection.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused owner-boundary repair after normal maintainer approval, preserving the shared active-turn context path and runtime-scoped UI catalog selection.

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

Yes, source-reproducible: pre-PR metadata fallback could map logical Ultra to Max, child planning reread saved thinking rather than the active turn, and the UI catalog lookup ignored runtime identity.

Is this the best way to solve the issue?

Yes. The patch repairs each mismatch at its boundary owner—Codex request construction, shared tool context, child planning, and UI catalog selection—without adding configuration or parallel fallback paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: The patch repairs bounded reasoning-mode and subagent-inheritance behavior without evidence of an urgent service outage or data-loss condition.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository state identifies this as a MEMBER-authored PR, so the external-contributor proof gate does not apply; the submitted body nevertheless records authenticated Gateway and Control UI evidence, while focused source and contract review confirms the changed owners.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jesse Merhi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (6 earlier review cycles)
  • reviewed 2026-09-01T18:40:14.577Z sha 51f7d70 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T19:22:07.466Z sha 34bcfd8 :: found issues before merge. :: [P2] Forward active thinking through the Codex tool surface
  • reviewed 2026-09-01T19:33:45.865Z sha 34bcfd8 :: needs changes before merge. :: [P2] Forward active thinking through the Codex dynamic tool surface
  • reviewed 2026-09-01T19:48:56.737Z sha 34bcfd8 :: needs changes before merge. :: [P2] Forward active thinking through the Codex dynamic tool surface
  • reviewed 2026-09-01T20:21:52.704Z sha fbaedcd :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T20:35:43.113Z sha 8bee18e :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Sep 1, 2026
@clawsweeper clawsweeper Bot added 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. and removed 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. labels Sep 1, 2026
@clawsweeper clawsweeper Bot added 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 Sep 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 1, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 1, 2026
@steipete
steipete merged commit ee9e22b into main Sep 1, 2026
304 checks passed
@steipete
steipete deleted the codex/gpt-ultra-parity branch September 1, 2026 20:53
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
* fix: preserve Ultra across model runtime boundaries

Keep native Codex Ultra as a runtime mode instead of clamping it against
physical Responses effort tiers. Share the selected collaboration effort
between turn fields and remove the redundant forwarding wrapper.

Carry the active parent thinking level through existing spawn context so
one-shot overrides reach native subagents without changing saved preferences.
Keep explicit child overrides and configured child defaults authoritative.

Scope Control UI thinking catalog fallback to the selected runtime, sharing
one prepared entry for picker options and the inherited default. Document
the native orchestration/budget boundary and active-turn inheritance.

* refactor: simplify Ultra reasoning fixtures

* fix: preserve active thinking across shared tool contexts

* docs: clarify Off thinking for side questions
RomneyDa added a commit that referenced this pull request Sep 19, 2026
* feat(meta): add Muse Spark 1.3 models (#136553)

* feat(meta): add Muse Spark 1.3 models

* docs(meta): cite Muse Spark 1.3 recommendation

Co-authored-by: Tharun Tej Tammineni <[email protected]>

---------

Co-authored-by: Dallin Romney <[email protected]>
(cherry picked from commit 194b7f2)

* feat(anthropic): support Fable 5.1 from shared model metadata (#135638)

* feat(anthropic): support Fable 5.1 from shared model metadata

* test(anthropic): keep alias coverage within the file limit

* fix(media): decouple image limits from catalog augmentation

(cherry picked from commit 0a9b08c)

* feat(openai): support GPT Image 2.5 variants (#143068)

* feat(openai): support GPT Image 2.5 variants

* docs(openai): correct GPT Image 2.5 section link

(cherry picked from commit f93881f)

* feat(fal): support GPT Image 2.5 variants (#143069)

* feat(fal): support GPT Image 2.5 variants

* test(agents): restore Windows media fixture isolation

(cherry picked from commit a57c799)

* fix(bedrock): preserve images returned by tools (#149336)

## What Problem This Solves
Tool-returned images make the next request fail with `ValidationException` on affected Bedrock routes. Fixes #149332.

## Why This Change Was Made
The serializer generates image labels from each tool-call ID; input images need no labels. All consecutive tool results come first, followed by image groups in the same tool order. Request state has one writer. `stream.runtime.ts`: +28/−1 for this conversion.

Growth accepted under the owner's standing acceptance (2026-09-15).

## User Impact
Image-reading turns can finish without losing image bytes, tool associations, or error status.

## Evidence
Authenticated `chat.send` → registered `read` on a synthetic PNG: main sent a nested image and failed; candidate sent a sibling image and completed with the scripted “Red square; blue circle.” Our run used a recording HTTP transport.

The [contributor's real two-tool run](#149336 (comment)) confirms image interpretation and association.

## Compatibility
Concrete route identities select the conversion. Opaque aliases keep their layout. The general schema permits nested images for some routes; this repair addresses the affected route’s observed rejection. No config or public interface changes.

## Consumers
All clients use the existing Bedrock serializer.

## Invalidation
Conversion is request-local. Stored transcript rows and original image bytes remain unchanged.

## Tests
`node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-providers.config.ts extensions/amazon-bedrock`: 289 tests across 12 files passed on a fresh merge with main. Types, lint, formatting, file-size and assertion limits, and unused-export checks passed.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 115522a)

* fix: preserve Ultra across model runtime boundaries (#135397)

* fix: preserve Ultra across model runtime boundaries

Keep native Codex Ultra as a runtime mode instead of clamping it against
physical Responses effort tiers. Share the selected collaboration effort
between turn fields and remove the redundant forwarding wrapper.

Carry the active parent thinking level through existing spawn context so
one-shot overrides reach native subagents without changing saved preferences.
Keep explicit child overrides and configured child defaults authoritative.

Scope Control UI thinking catalog fallback to the selected runtime, sharing
one prepared entry for picker options and the inherited default. Document
the native orchestration/budget boundary and active-turn inheritance.

* refactor: simplify Ultra reasoning fixtures

* fix: preserve active thinking across shared tool contexts

* docs: clarify Off thinking for side questions

(cherry picked from commit ee9e22b)

* fix(anthropic): Fable 5.1 sessions lose reasoning after model switches and runtime events (#136782)

* fix(anthropic): keep Fable 5.1 thinking valid across model switches and runtime context

Claude Fable 5.1 binds each thinking block to the producing model and to the
exact request prefix that preceded it. Three harness behaviors conflicted with
that contract on Anthropic-family routes:

- Moving a session onto Fable 5.1 (from Opus 5, Sonnet 5, Opus 4.8, Fable 5)
  dropped readable reasoning client-side; the replay contract now preserves it
  while leaving Fable 5.1 still drops.
- The per-turn runtime-context carrier was injected transiently after the
  active user turn, stripped on the next request, relocated inside tool loops,
  and removed by the context-engine assembly. It is now persisted right after
  its user turn and replayed in place; inline inbound metadata stays in place
  too, and consecutive user turns are no longer merged at load for the
  Messages API because the merged form lost the second turn's timestamp stamp.
- Direct API-key requests with adaptive thinking send the
  thinking-binding-controls beta with prefix_mismatch_behavior=drop_block, so
  a residual mismatch degrades to a server-side unbilled drop with a warning
  listing the dropped paths instead of a 400, a duplicate request, and a
  transcript-wide thinking wipe. OAuth, proxies, Bedrock, Vertex, and Foundry
  keep the existing strip-and-retry recovery.

Live-verified against api.anthropic.com: nine-request Fable/Opus/Fable session
with tool loops and carriers reports input_transformations: [] on every
request with four retained thinking blocks; a /think change on the direct API
yields a logged server-side drop and no retry.

* fix(anthropic): limit the preserved-thinking replay target to Fable 5.1

Mythos 5.1 is not registered in the bundled catalog and has no cross-model
replay proof, so unregistered Mythos targets keep the existing drop path.

(cherry picked from commit 30837ae)

* feat(openai): support GPT-6 Astra (#137550)

* feat(openai): support GPT-6 Astra

* fix(models): preserve declared pricing tiers during catalog refresh

(cherry picked from commit eb72093)

* fix(openai): require discovery before offering Astra for OAuth (#137561)

(cherry picked from commit 8b1add5)

* fix(diagnostics-prometheus): reject unauthorized metric scrapes (#140903)

* fix(diagnostics-prometheus): require operator.read for metric scrapes

The Prometheus scrape route registers under the trusted-operator runtime
scope surface, so the Gateway authenticates the caller and applies its
named-role scope ceiling before dispatch. The handler never consulted
those scopes, so an authenticated identity whose role grants no operator
scopes still received the full diagnostics document with 200, while the
same caller was correctly refused on equivalent read operations.

Check the runtime request scopes inside the handler and fail closed with
403 "missing scope: operator.read" unless the caller holds operator.read,
operator.write, or operator.admin, mirroring the Gateway read implication
set. The guard runs before rendering so HEAD probes cannot disclose the
document size either.

* test(diagnostics-prometheus): prove role-limited scrape denial

(cherry picked from commit 0c9330b)

* fix(discord): enforce sender media policy on guild asset uploads (#140334)

The Discord emoji-upload, sticker-upload, and event-create branches dropped
the sender-scoped media access options before dispatching the action, so the
guild runtime loaded the requested host-local path with only a byte limit. A
sender permitted to run those actions could therefore place bytes from a file
outside their allowed media roots into an outbound Discord emoji, sticker, or
event-cover request.

Forward the resolved action options from all three branches, carry
mediaAccess/mediaLocalRoots/mediaReadFile through the guild runtime, and load
upload sources through buildOutboundMediaLoadOptions like every other outbound
Discord media path. Adds regression coverage that a source outside the sender
roots is rejected before any request is issued, with an in-roots control.

(cherry picked from commit e5e7764)

* fix(discord): preserve realtime speaker and playback ownership (#137433)

* fix(discord): preserve realtime speaker and playback ownership

Bind provider connections to one Discord principal so delayed transcripts
and native consultations cannot inherit another speaker's authority.
Keep the shared agent route and serialize response-owned audio on one
room player, preserving continuations and recovery after playback gaps.

Admit host-requested responses before dispatch and map Google Live turn
completion to canonical terminal outcomes so queued speech can finish.

Closes #137349
Related: #136982, #123243
Follow-up: #137417

* test(discord): preserve room capture across speaker recovery

(cherry picked from commit 85d510c)

* fix(doctor): preserve enabled skills during automatic updates (#138730)

Use runtime-repair approval for optional skill disabling. Keep standalone explicit repair and required config migrations unchanged.

(cherry picked from commit acc9a65)

* fix: generated images disappear after failed tool calls (#131226)

## What Problem This Solves

WebChat drops generated media when a later tool failure is the turn's only reply payload.

## Root cause

The embedded-run terminal projection assigned successful tool media to the first non-reasoning payload. A later error warning could become that owner. Gateway error projection then discarded the attached media.

## Fix

- Attach tool media only to a successful, non-reasoning reply.
- Emit a separate media-only payload when the turn has no successful reply.
- Preserve the newer host-owned and automatic-delivery media paths from current `main`.
- Keep regression coverage at the payload owner and physical-delivery boundaries.
- Remove the mocked browser test that manually inserted its expected result.

## Evidence

- Baseline: current `main` at `8544aed05a5dbffb871483be781f71351203319e`.
- Real path: branch-built Control UI → real Gateway → mock OpenAI Responses provider → successful image tool → later failing tool → terminal WebChat event.
- Red: current `main` rendered zero generated images.
- Green: `d2a10d40c633bfe796ad4ab19222aa831184a327` rendered one generated image.
- Anti-cheat: the proof recorded `image-success` before `later-failure` and verified that Chromium loaded the exact Gateway-served asset from the branch build.

## Validation

- Focused unit and integration tests: 19 passed across 2 Vitest shards.
- Real Gateway and built Control UI proof: passed on current `main` and the candidate head with opposite image assertions.
- Targeted format, Oxlint, conflict-marker, max-lines, assertion-safety, and diff checks passed.
- Type checks run in continuous integration because repository policy forbids them on this host.

Production change: `+3/-3`, net zero. Test change: `+23/-1`, net `+22`.

Co-authored-by: A28Hui <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 88be1b8)

* fix(matrix): refresh verification status before reporting device trust (#136226)

* fix(matrix): refresh verification status before reporting device trust

Refresh own-device keys after crypto preparation and before the authoritative trust read. Keep the missing-device preflight and use the Matrix SDK’s existing query contract.

* test(slack): remove core-coupled threading duplicate

---------

Co-authored-by: Dallin Romney <[email protected]>
(cherry picked from commit a812054)

* chore(release): prepare extended-stable 2026.8.33

* fix(release): integrate model and Discord security backports

* docs(release): clarify extended-stable workflow baseline

* fix(release): complete stable-line backport integration

* fix(ios): restore dependency resolution with WebRTC 152 (#134942)

* fix(release): repair frozen validation inputs

* fix(discord): stop error replies after voice consult cancellation (#135380)

* fix(discord): stop error replies after voice consult cancellation

Treat host-cancelled Discord realtime consults as terminal cancellation, preserve late-call dedupe, and wait for every native delivery before returning forced playback ownership. Timeouts and genuine errors retain their normal handling.

Closes #135340. Related phone cancellation helper: #134924.

* test(acp): run CLI lifecycle checks against prepared runtime

* test(cli): cover selective runtime build admission

* test(ci): account for ACP runtime preparation

* fix(release): complete Discord cancellation backport

* test(release): keep candidate fixtures current

* test(update): isolate frozen release version

---------

Co-authored-by: tharuntejmeta <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: dclosefuturex <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Pavan Kumar Gondhi <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: CGlashu <[email protected]>
Co-authored-by: A28Hui <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex extensions: copilot maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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