Skip to content

Keep active-turn model settings stable across updates - #38785

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c51352218e463dcc9b7338566d16742292c49fbf
Aug 15, 2026
Merged

Keep active-turn model settings stable across updates#38785
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c51352218e463dcc9b7338566d16742292c49fbf

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 15, 2026

Copy link
Copy Markdown

Keep active-turn model settings stable across updates

Why

Thread settings can change while a turn is still active, including between sampling requests. Those updates should apply to the next turn instead of changing the model configuration partway through the current turn.

What changed

  • Snapshot the model, reasoning settings, service tier, approval settings, and model-attributed telemetry in StepContext.
  • Build prompts, model requests, world state, tracing, and startup prewarms from that step-scoped snapshot.
  • Share immutable model metadata between turn and step contexts.

Testing

Added an integration test that pauses an active turn, updates its thread settings, and verifies that all requests in the active turn retain the original settings while the next turn uses the updates.

## Why

Thread settings can change while a turn is still active, including between sampling requests. Those updates should apply to the next turn instead of changing the model configuration partway through the current turn.

## What changed

- Snapshot the model, reasoning settings, service tier, approval settings, and model-attributed telemetry in `StepContext`.
- Build prompts, model requests, world state, tracing, and startup prewarms from that step-scoped snapshot.
- Share immutable model metadata between turn and step contexts.

## Testing

Added an integration test that pauses an active turn, updates its thread settings, and verifies that all requests in the active turn retain the original settings while the next turn uses the updates.

GitOrigin-RevId: c51352218e463dcc9b7338566d16742292c49fbf
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c51352218e463dcc9b7338566d16742292c49fbf branch from 2b8b02f to 00f6a8a Compare August 15, 2026 16:59
@copyberry
copyberry Bot merged commit 00f6a8a into main Aug 15, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c51352218e463dcc9b7338566d16742292c49fbf branch August 15, 2026 17:00
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants