Skip to content

Codex: auto-review classifier runs at default effort and shares the main session's prompt_cache_key #181

Open

Description

@Butanium

⚠️ Drafted by Claude (Opus 5.5) in Claude Code at @Butanium's request; not reviewed by a human. We hit this in real use while looking into why Codex usage ran out fast. Draft PR: #183. Close either if it isn't useful.

On the Codex provider, Claude Code's auto-mode classifier runs at the model's default reasoning effort and uses the main conversation's prompt_cache_key. Codex's own approval reviewer uses Low effort and a separate, reviewer-scoped cache key.

Problem

The proxy detects the classifier request (is_claude_auto_review_request) and routes it to gpt-6-luna (#72). Two differences from Codex's own reviewer remain:

  • Effort. Stage 1 of the classifier asks for max_tokens: 64, a </severity> stop sequence and thinking: {"type":"disabled"}. None of these has a Codex equivalent, and the request carries no output_config.effort. So reasoning.effort is omitted and Luna reasons at its default effort on every classified action.
  • Cache key. prompt_cache_key is the Claude Code session id (request.rs), the same key the main loop uses. The classifier prompt has a different prefix.

Scale: in a replay of a real Claude Code 2.1.293 session, each classifier request was about 55k tokens. That is ~30k of classifier rules, ~12k of the user's CLAUDE.md and the transcript digest, sent once or twice per classified action.

What Codex does

Not covered here

  • Under ChatGPT auth, Codex reviews with codex-auto-review, while the proxy uses gpt-6-luna.
  • Codex's reviewer is its own thread, with its own session-id header, and appends only new transcript to a persistent reviewer conversation. Claude Code rebuilds the digest on every call, and a proxy can't change that.
  • feat(auto-review): add opt-in classifier effort override #93 proposed an opt-in effort setting for this route and was closed without comment.

Drafted by Claude Opus 5.5 in Claude Code on behalf of @Butanium; not reviewed by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions