Repository navigation
Conversation
…ewer
On the auto-review route, default the classifier to Low reasoning effort and
give it a reviewer-scoped prompt_cache_key (guardian:{session}), the two
settings Codex uses for its approval reviewer
(ext/guardian-reviewer/src/model.rs, core/src/guardian/review_session.rs).
An explicit output_config.effort on the request still wins.
Setting an effort turns on the reasoning summary and encrypted reasoning
content. The classifier reads only its text verdict, so the route omits both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xmx9RE7u4ZLBzSUjpjqyBM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #181. On the Codex provider, Claude Code's auto-mode classifier now runs the way Codex runs its own approval reviewer: at Low reasoning effort, with a reviewer-scoped
prompt_cache_keyofguardian:<session id>. Before this, it ran at the model's default effort and shared the main conversation's cache key.Change. This applies only to requests the auto-review route already detects on Codex:
output_config.effortdefaults tolow. An effort already set on the request still wins.prompt_cache_keyisguardian:<session id>.Normal requests are unchanged. This copies Codex:
select_review_modelpicks Low when the review model supports it, andprompt_cache_key_override_for_review_sessionusesguardian:{parent_thread_id}.Not done
codex-auto-review, while the proxy keepsgpt-6-luna.CCP_CODEX_EFFORT/codex.effortoverride still applies to the classifier, as it does to every request.Details for reviewers and agents: implementation, tests, live check
Implementation
src/server.rs:apply_codex_auto_review_defaultsruns whenbypass_provider_model_overrideis set, i.e. on the auto-review route on Codex. It insertsoutput_config.effort = "low"if absent, setsprompt_cache_key_override = guardian:<session id>, and setsomit_reasoning_artifacts.src/anthropic/schema.rs: two new#[serde(skip)]fields onMessagesRequest, so clients can't set them.src/providers/codex/translate/request.rs: the override replaces the session-id cache key.omit_reasoning_artifactsskips the reasoning summary andinclude: ["reasoning.encrypted_content"].Edge case. If the incoming request has no session id, the cache key is left unset, as before.
Tests
codex_classifier_gets_low_effort_and_guardian_cache_keyandcodex_classifier_keeps_explicit_effort.cargo fmt --all -- --check: clean.cargo clippy --all-targets --locked: no diagnostics.cargo test --all-targets --locked: 1121 passed, 0 failed.Live check. Against real Codex, through our running build (this change applied on v0.1.44):
<severity>0</severity>as a single text block with no reasoning block. The second read 54,016 input tokens from the cache.Review. One automated review pass with a separate Claude agent found no correctness bug. It pointed out that setting an effort turns on reasoning artifacts the classifier doesn't use, and those are now omitted.
Drafted by Claude Opus 5.5 in Claude Code on behalf of @Butanium; not reviewed by a human.
https://claude.ai/code/session_01Xmx9RE7u4ZLBzSUjpjqyBM