Repository navigation
Apply Session updates and auto_review per root Turn in Codex - #921
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
SaladDay
force-pushed
the
feat/codex-turn-settings
branch
from
November 5, 2026 07:51
914ee7b to
4ae15b2
Compare
… the factory, compare models in SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex now applies the official Session updates and
review: auto_reviewfrom each root Turn on (Agents API pin 3.45.0). It needs one protocol change, which the Claude Code change builds on.Protocol (Core–Runtime 0.25.0)
proto.TurnSettingsgainsreview(auto_review; empty is none). Core fills it from the Turn's bound settings.turnin its identity.Declaration.ValidateSessionUpdate(previous, next)decides every difference. Core uses the same function on Session update.reviewwhen the Harness declares a review value.configuration_conflict.turnonce, in dispatch, against the registered declaration. The adapter-levelValidateTurnSettingscalls are deleted.configurationsmap is gone.runtime-protocol.md(theturnand identity rows) andharness-onboarding.md(Binding, and the adapter's obligation to apply a changedturnnatively before input). Both have zh mirrors.Codex
Every
turn/startcarries:model;effort, when set;serviceTier, the tier or null for auto;approvalPolicyandapprovalsReviewer:nonesendsnever/user, andauto_reviewsendson-request/auto_review.These go on every Turn because a cold
thread/resumerestores the persisted values.The declaration supports changing model, effort and service tier. It does not support resetting effort, because Codex cannot clear it. Reviews:
auto_review.An escalation that still reaches the client gets JSON-RPC -32601, and Codex turns that reply into a denial. This is the official "deny manual approval fallbacks"; a new test covers it.
Docs updated, with their zh mirrors:
harness-capabilities.md, the Codex guide, the unattended paragraph ofharness-onboarding.md, and the ledger.Verification
go vetpasses.go testpasses foragent/...,dispatch,wireconformance,harnessconfig/...and Coreexecution.check-runtime-contract,check-harness-catalogandcheck-translationspass.StartTurnreceives it.turn/startcarries the five fields fornoneandauto_review, and a second Turn sends the new model.Review fixes
ValidateTurnSettingsloop, andValidateReviewis deleted.ResolveExecutornow returns the declaration with the factory, so the second registry lookup is gone.MarkSessionModelSource) instead of decoding it twice in Go.agent.modelreturns 400.auto_reviewreviews (below).Real-model run (test cluster, MiniMax-M2.7)
auto_review.turn/startcarriedon-request/auto_review, and an escalatedrm -rfwas denied with no required action reaching Core. Two native limits are now in the ledger, by owner decision:codex-auto-reviewthrough the Session's provider, so a provider that does not serve that model denies every escalated action with its own error.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.