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

Resolved 💬 1 comment Opened Mar 5, 2026 by kevinfosterNG Closed Apr 3, 2026

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 stagingproduction 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.

<img width="680" height="457" alt="Image" src="https://github.com/user-attachments/assets/7269a69e-80c7-4e1c-befb-f3ef10be9f12" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗