Codex GitHub reviews: add ‘only default branch’ option

Hi folks — we’re using Codex for GitHub pull request code review, and one workflow issue keeps burning review quota and creating noise.

Problem
Right now, Codex reviews run on all PRs, not just PRs targeting the repository default branch. That’s a problem for teams with a multi-branch release process.

Our release flow (common pattern):

  1. PR main (default) → staging for smoke testing

  2. PR stagingproduction for deployment promotion

These PRs are often mostly merges/promotions (sometimes auto-generated merge commits) and don’t benefit from a full Codex review — but Codex still runs, which:

  • consumes review quota/credits,

  • adds notification noise,

  • and makes it harder to reserve Codex reviews for the PRs that matter (feature → main).

Feature request
Please add a setting to control which PRs trigger automatic Codex review, ideally one or both of:

  • Option A (simple): Only run automatic review when the PR base branch is the repo’s default branch.

  • Option B (more flexible): A configurable allowlist / denylist of base branches (e.g., allow main only, or allow main + release/*; deny staging, production, etc.).

Nice-to-have
If possible, also allow a manual override pattern like “only run when label codex-review is present” or “skip when label no-codex is present,” so teams can opt-in/opt-out per PR.

Happy to provide more details or examples if helpful. Thanks!

Welcome to the forum!

While you can post feature request for Codex here the official place is the GitHub OpenAI Codex issue tab.

Be sure to check the enhancement does not already exist, if not then create a new issue with the enhancement label.

1 Like