GuidesHosting choices

Codex GitHub: the repo, @codex review and the GitHub Action

The openai/codex repo, connecting GitHub to Codex Cloud and what its app may do, @codex review and its plans, and openai/codex-action in CI.

November 23, 2026The Everpod team
The short answer

The openai/codex repository is the open-source home of the Codex CLI, OpenAI’s coding agent for the terminal: Apache-2.0, written in Rust, latest release 0.171.0 (November 20, 2026). Using Codex with your own GitHub is a separate setup. You install OpenAI’s ChatGPT Codex Connector GitHub app on the repositories you choose (Codex prompts for it when you create a Codex Cloud environment); cloud tasks can then clone those repositories, and you open pull requests from their results. Turn on code review at chatgpt.com/settings/code-review and comment @codex review on a pull request, or let new ones be reviewed automatically; it comes with Plus, Pro, Business, Enterprise and Edu, not with an API key. To run Codex inside GitHub Actions, use openai/codex-action@v1 with an OpenAI API key. The app asks for write access to your code, pull requests, issues, workflow files and Actions, so give it selected repositories, not all of them.

Which part of Codex and GitHub you need

You wantWhat it isWhere it runsWhat it needs
The source, the issue tracker, the releases
openai/codexYour machine, once installedNothing; it is public
Codex working on your repositories while you are away, ending in a pull request
Codex Cloud with the GitHub appA VM OpenAI provides per taskPlus, Pro, Business, Enterprise or Edu; the app installed
Reviews on pull requests
Codex code review (@codex review, automatic reviews)OpenAI’s cloudThe same plans; code review turned on for the repository
Codex as a step in CI
openai/codex-action@v1Your GitHub Actions runnerAn OpenAI (or Azure OpenAI) API key as a secret
Codex on your own computer pushing branches
The CLI or the ChatGPT desktop appYour computer or serverYour own git and GitHub credentials, no app

The openai/codex repository

Its own description is “Lightweight coding agent that runs in your terminal.” As of November 23, 2026 it has more than 136,000 stars, and the latest release is tagged rust-v0.171.0. OpenAI’s open-source page lists what else lives in it, the Codex SDK and the App Server, and what is not open source at all: the IDE extension and Codex cloud. The base environment Codex cloud uses is published separately as openai/codex-universal, and the GitHub Action as openai/codex-action.

The README’s install commands:

# macOS or Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

# or a package manager
npm install -g @openai/codex
brew install --cask codex
Copied

Each GitHub release also carries prebuilt binaries, such as codex-x86_64-unknown-linux-musl.tar.gz for 64-bit Linux. Run codex and choose Sign in with ChatGPT to use your plan; setting it up on a machine that stays on is in Codex CLI on a Linux server.

If you came to contribute code, the contribution guidelines are blunt: “We do not accept external code contributions or pull requests.” What the project takes is issues: bug reports with reproduction steps, logs and root-cause analysis, and feature requests. Security vulnerabilities go through its security policy, not a public issue.

Connecting your GitHub to Codex

Codex reaches your repositories through a GitHub app OpenAI publishes, ChatGPT Codex Connector. Per OpenAI’s cloud environments page, you connect it while creating an environment: on the web or in the ChatGPT desktop app choose Work in > Cloud, open Select environment, select Create environment, select the repositories to check out, and Connect GitHub if prompted. In the desktop app, a project whose repositories are on GitHub.com can use them in the default environment once your GitHub account is connected.

On GitHub’s side, installing an app means choosing where and how widely, per GitHub’s installation docs:

When a repository doesn’t show up in Codex, OpenAI’s help article on the GitHub connection gives the usual causes: repositories “generally take about 5 minutes to appear”; a private or new repository may not appear until the app is installed on the right account or organization with that repository selected; an organization may need an administrator to approve the app or the repository; and an organization using GitHub’s IP allow list has to add OpenAI’s egress IP blocks to it. Self-hosted GitHub Enterprise Server is listed among cloud environments’ current limitations.

Codex Cloud is on Plus, Pro, Business, Enterprise and Edu. OpenAI’s Codex plan article says it “is not included with Free or Go,” and that cloud access “is off by default for Enterprise workspaces that have not enabled it.” What a cloud task’s machine has, keeps and can reach is in Codex cloud, or Codex on a machine of your own.

What the Codex GitHub app can do in your repositories

Installing a GitHub app grants it the permissions it requested, on the repositories you chose. GitHub’s API publishes any app’s list, so you can read it before you install:

gh api apps/chatgpt-codex-connector --jq .permissions
Copied

On November 23, 2026 it returned the permissions below. The right-hand column is what GitHub’s permissions reference lets an app do with each.

PermissionLevelWhat it allows
Contents
Read and writeClone and push over HTTPS, create branches and commits; in GitHub’s API it is also the permission for merging a pull request and creating a release
Pull requests
Read and writeOpen and edit pull requests, post reviews and review comments, request reviewers
Issues
Read and writeOpen issues, comment, add labels and assignees
Workflows
WriteChange files in .github/workflows
Actions
WriteRe-run, cancel and dispatch workflow runs, approve runs waiting on a first-time contributor’s fork pull request, enable or disable workflows, delete runs, logs, artifacts and caches
Checks, Commit statuses
ReadSee CI results
Metadata
ReadRepository metadata
Email addresses (your account)
ReadYour GitHub account’s email addresses

That is the most the app can do, not a list of what Codex does; OpenAI’s documentation doesn’t say which features use the Actions and Workflows permissions. The help article above, which is about connecting GitHub to ChatGPT itself, sends you to this same app’s installation settings when a repository is missing, and says “The GitHub app in ChatGPT only lets you read from your repositories to analyze and search your code. To generate, edit, and push code directly to GitHub, use Codex.”

Ways to keep the reach small:

A cloud task works under the GitHub connection of whoever runs it: “Repository access and personal connections depend on the account running the task.”

@codex review: Codex code review on pull requests

Setting it up, per OpenAI’s GitHub review page, needs the app installed on the repository and push or admin permission on it, but no cloud environment (“Cloud review doesn’t require you to create or manage a cloud environment,” says OpenAI’s code review page):

  1. Open Codex code review settings.
  2. Choose the repository.
  3. Turn on Automatic review under Review code.

Then comment @codex review on a pull request. Codex reacts with 👀 and posts a review; add a focus after the command, as in OpenAI’s example @codex review for issues in the database migration. For your own pull requests to be reviewed without a comment, also turn on Automatic review under Personal preferences on the same page and pick when with Review trigger; that applies in every repository with code review on.

What arrives. The docs say “In GitHub, Codex flags only P0 and P1 issues so review comments stay focused on high-priority risks.” Codex’s reviews on public pull requests on November 23, 2026 flagged P2 issues too, often more than P1, including on pull requests where nobody had commented @codex review. OpenAI’s GitLab page draws a line its GitHub page doesn’t: there, “By default, manually requested reviews can include P0, P1, and P2 findings, while automatic reviews focus on P0 and P1 findings.” Those reviews came from chatgpt-codex-connector[bot] as comment reviews, neither approving nor requesting changes, and their footer says reviews start when you open a pull request for review, mark a draft as ready, or comment @codex review, and “If Codex has suggestions, it will comment; otherwise it will react with 👍.” OpenAI’s own line on the process around it: “Code review rules guide Codex; they don’t replace tests, branch protections, or required approvals.”

Steering it. Codex looks through the repository’s AGENTS.md files for a ## Code Review Rules section, applying the root file’s rules plus those of any more specific file that covers each changed file, so a service’s rules can sit in that service’s folder. OpenAI suggests starting with two or three rules that name the consequence and the safe path, and leaving formatting and lint to CI. A rule in that shape:

## Code Review Rules

### Database migrations

- Flag a migration that drops or renames a column the previous release still reads.
  Safe path: add the new column, backfill it, remove the old one in a later release.
Copied

How nested AGENTS.md files combine in general is in what AGENTS.md is.

Plans and usage. OpenAI’s pricing page lists “GitHub code review and automatic PR reviews” on Plus, Pro, Business and Enterprise/Edu, and gives an API key “No cloud-based features (GitHub code review, Slack, etc.)”. Its FAQ: “Code Review usage applies only when Codex runs reviews through GitHub, for example, when you tag @Codex for review in a pull request or enable automatic reviews on your repository. Reviews run locally or outside of GitHub count toward your general usage limits.” How much Codex each plan carries is in which ChatGPT plans include Codex.

When Codex doesn’t react, OpenAI’s checklist: code review is on for the repository in the settings; the pull request belongs to a connected repository; the comment uses the exact trigger @codex review; and, for automatic reviews, Automatic review is on in both the repository settings and Personal preferences, with the pull request event matching your trigger.

From the desktop app. The ChatGPT desktop app’s Code Review plugin opens a pull request’s description, changed files, comments and checks, and Review with Codex reviews it in a chat. Per the code review page, that “doesn’t post comments, approve it, or merge it”; your review goes to GitHub when you use Submit review (Comment, Approve or Request changes), with one catch: a comment posted in Summary or Changes goes to GitHub “immediately, without waiting for Submit review.” These reviews are separate from the automatic ones. Anthropic’s counterpart for Claude Code is organised and billed differently; it is covered in Claude Code review.

@codex security review

A second, deeper pass for security issues, in research preview. The Security Review page says it “is available to ChatGPT Enterprise, Business, Edu, and Pro customers. It isn’t available on Plus,” and that reviews consume included Codex allowance or ChatGPT credits. In the same settings, turn on Auto security review under Review security vulnerabilities, set Review to Follow personal preferences, All PRs or, where available, Team PRs (members of your ChatGPT workspace, not a GitHub team), and Trigger to On PR open, On every push, or Whenever code review runs. By default automatic reviews post High and Critical findings and requested ones add Medium. On a public repository, note that findings posted to a pull request “inherit that pull request’s GitHub visibility”: anyone who can see the pull request sees them. The full report stays in Codex, on the task’s Security Report tab.

Getting Codex to change code and open pull requests

From a cloud task. Once a task finishes you inspect the changed files and check results, ask for follow-ups, and “commit or open a pull request when you’re ready”, in OpenAI’s words. From the terminal, the experimental codex cloud exec --env <ENV_ID> "<task>" submits a task to an environment (--env is required, and --attempts 1-4 runs several attempts), codex cloud list shows recent ones, and codex apply applies a cloud chat’s latest diff to your local checkout, exiting non-zero if git apply fails.

From a pull request comment. The footer on Codex’s reviews says “Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".” OpenAI’s GitHub page documents only the two review commands; comment tasks are written down on its GitLab page, where @codex with anything other than review starts a chat in Codex Cloud (Legacy) with the merge request as context, needs a configured project environment, and “can push a fix back to the branch when it has permission to do so.” The legacy experience, whose environments live at chatgpt.com/codex/settings/environments, is described as one that “continues to support environments for Code Review and the Linear and GitHub integrations,” and OpenAI says it plans to deprecate it.

From the desktop app. Its built-in Git controls let you stage or revert hunks and files, “commit changes, push a branch, and create a pull request without leaving the app.”

From the CLI on your own computer or server, no GitHub app is involved: Codex runs git and gh as your user, with whatever credential that user holds. Choosing one narrow enough for an agent is in GitHub access for a coding agent on a server.

Codex in GitHub Actions: openai/codex-action

openai/codex-action installs the Codex CLI on the runner, starts a proxy to the Responses API that holds your key, and runs codex exec with your prompt. Its latest release is v1.14 (November 16, 2026); workflows use openai/codex-action@v1. It takes an API key, not a ChatGPT sign-in: an OPENAI_API_KEY repository secret, or an Azure OpenAI key together with responses-api-endpoint. Usage on a key is paid at API pricing. OpenAI’s Action page has a review workflow; here it is with the read-only permission profile the action’s README recommends for workflows that only read:

name: Codex pull request review
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  codex:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    outputs:
      final_message: ${{ steps.run_codex.outputs.final-message }}
    steps:
      - uses: actions/checkout@v5
        with:
          ref: refs/pull/${{ github.event.pull_request.number }}/merge
          fetch-depth: 0
          persist-credentials: false

      - name: Run Codex
        id: run_codex
        uses: openai/codex-action@v1
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          permission-profile: ":read-only"
          prompt-file: .github/codex/prompts/review.md

  post_feedback:
    runs-on: ubuntu-latest
    needs: codex
    if: needs.codex.outputs.final_message != ''
    permissions:
      issues: write
      pull-requests: write
    steps:
      - uses: actions/github-script@v7
        env:
          CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }}
        with:
          github-token: ${{ github.token }}
          script: |
            await github.rest.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.payload.pull_request.number,
              body: process.env.CODEX_FINAL_MESSAGE,
            });
Copied

The split is the point: the job that runs Codex can only read the repository, and the job that can write to the pull request never sees the API key. Write the prompt in .github/codex/prompts/review.md; it is read from the same pull request checkout Codex works in. The action’s security notes count a pull request’s body (including hidden HTML comments), its commit messages and AGENTS.md files in its checkout as untrusted input, which is how prompt injection gets in.

Fork pull requests won’t get this review on a public repository, for two documented reasons: GitHub says that “With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository,” and by default the action runs only for users with write access to the repository. allow-users adds named users, allow-bots lets github-actions[bot] through, and allow-bot-users lists other bots by name.

The inputs that matter most, from the README:

Where it trips people up:

For fixing code rather than reviewing it, the same page has a workflow that runs when CI fails: a job with contents: read runs Codex and saves its changes as a patch artifact, and a separate job with write permissions, which never receives the API key, applies the patch and opens a pull request with gh pr create.

Signing in with ChatGPT on a runner instead

The action needs an API key. To run CI on your ChatGPT plan’s allowance instead, you run codex exec yourself with a saved ChatGPT login, which OpenAI documents as an advanced path and opens with “The right way to authenticate automation is with an API key.” The conditions it sets: a trusted private runner, “Do not use this workflow for public or open-source repositories,” and only one machine or one serialized stream of jobs per copy of the login. On a trusted machine, set cli_auth_credentials_store = "file" in config.toml, run codex login, and store the resulting ~/.codex/auth.json as a secret. Codex refreshes the tokens when the file’s last_refresh is older than about 8 days and writes them back, so the runner must keep the updated file between runs and seed it from the secret only when it is missing; rewriting it every run throws the refreshed tokens away. A persistent self-hosted runner does that most simply.

Either way, codex exec and codex review load a repository’s own .codex/ configuration and MCP servers only for trusted projects, and --trust is the switch; why it never belongs on a run over outside contributors’ pull requests is in Codex’s untrusted project configuration warning.

codex review and /review before you push

Not every “Codex review” involves GitHub. In the CLI, /review offers four presets (the desktop app and IDE extension offer the first two): Review against a base branch, Review uncommitted changes, Review a commit and Custom review instructions. A dedicated reviewer reads the diff and reports prioritized findings “without changing your working tree,” and review_model in config.toml gives reviews a different model from the session’s. The same thing from a script, per the command reference:

codex review --base main            # your branch against main
codex review --uncommitted          # staged, unstaged and untracked changes
codex review --commit 1a2b3c4 --title "Add rate limiting"
codex review "Focus on the migration and its rollback"
Copied

Each run takes one target: --uncommitted, --base, --commit and a custom prompt conflict with one another, and --title works only with --commit. CODEX_API_KEY works with codex review as it does with codex exec. Reviews run this way count toward your general Codex usage, not the GitHub code review usage above.

Run Codex on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.