Skip to content

Feature request: Limit Codex auto code review to default branch (or configurable branch allowlist) #13597

Closed as not planned

Description

@kevinfosterNG

What variant of Codex are you using?

Codex GitHub code review

What feature would you like to see?

Feature request: Limit Codex auto code review to default branch (or configurable branch allowlist)

Summary

Codex code review currently triggers on all pull requests. For teams with a multi-branch promotion/release flow, this creates noise and consumes review quota on PRs that don’t benefit from automated review.

The problem

In many repos, not every PR is a “code change PR” that should be reviewed. A common pattern is promotion PRs between long-lived branches (e.g., default → staging → production). These are often merge/promote operations and are not the right place to spend Codex review budget.

Our workflow (example)

  1. PR main (default) → staging for smoke testing
  2. PR staging → production for deployment promotion

Codex runs on both of these PRs today, which:

  • consumes review quota/credits unnecessarily,
  • adds notification noise,
  • reduces signal (reviews show up where humans don’t need them),
  • makes it harder to reserve Codex reviews for “feature → main” PRs.

Requested behavior

Add a repo/org setting (or workflow config) to control which PRs trigger Codex auto-review.

Preferred options:

  • Option A (simple, high value): Only run auto-review when the PR base branch is the repository default branch.
  • Option B (flexible): Configure an allowlist/denylist of base branches (e.g., allow main only; deny staging, production; or allow patterns like release/*).

Nice-to-have controls

Any of the following would also work well:

  • Only run when a label is present, e.g. codex-review
  • Skip when a label is present, e.g. no-codex
  • Only run on non-merge commits / skip PRs that are “promotion-only” (if that’s detectable)
  • Support for skipping reviews on PRs authored by automation/bots (optional)

Why this matters

  • Improves signal-to-noise for reviewers
  • Prevents quota exhaustion on routine promotion PRs
  • Matches common branching/release strategies (default → staging → production)
  • Lets teams adopt Codex reviews without having to redesign their release flow

Acceptance criteria (suggested)

  • A setting exists to restrict auto-review to PRs targeting the default branch or a configured branch/pattern allowlist
  • Behavior is consistent across repos in an org (if configured at org-level)
  • Existing users can keep current behavior (backwards compatible default)

Thanks — happy to provide examples/logs if needed.

Additional information

As a reference, taking 2 repo PRs to branch:release/ used the remaining 75% of my plan's utilization.

Image

Activity

  1. etraut-openai commented on Apr 3, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received enough upvotes, so closing.

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

    code-reviewIssues relating to code reviews performed by codexenhancementNew feature or requestgithub-actionIssues related to the Codex github action

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions