Learning resourcesReviewed · OpenAI

Codex GitHub Action documentation

The Codex GitHub Action documentation is a guide for developers automating AI coding tasks on GitHub, with careful permission and secret configuration required. It explains how to configure openai/codex-action@v1, supply tasks, capture responses and manage runner privileges.

Researched 14 Nov 2026

In short.

The Codex GitHub Action documentation is a guide for developers adding AI coding tasks to automated GitHub jobs, with the main catch that protecting secrets requires more than restricting file access. It covers CLI installation, task configuration, permissions and output handling, including a pull request review example. The example posts feedback but does not demonstrate a merge-blocking quality gate. Pricing, licensing, output quality and operational reliability are not established, and nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete selected page at [https://learn.chatgpt.com/docs/github-action.md], including prerequisites, workflow example, configuration, privilege controls, output handling, security guidance and troubleshooting. The linked documentation index, non-interactive guide, repository and unprivileged-user example are excluded. No code, workflow or API request was executed. Security effectiveness, performance, current release compatibility, costs and redistribution rights are not established.

The overview

Identity

This documentation page explains openai/codex-action@v1, an integration that runs Codex inside GitHub Actions workflows. Its source address is [https://learn.chatgpt.com/docs/github-action.md]. The page teaches setup and operation; the linked action repository is [https://github.com/openai/codex-action].

Assessment

The guide provides concrete configuration detail for teams that want repeatable code reviews or maintenance tasks in their existing GitHub automation. Its strongest practical feature is connecting execution, permissions and feedback posting in one example. It supplies no measurements of review accuracy, successful patch application or reliability.

Users

The intended readers are developers and maintainers who configure GitHub Actions and want Codex feedback on pull requests, releases or recurring maintenance work. Beginners will need familiarity with workflow files, repository secrets and job permissions. Experienced developers get controls for CLI versions, models, sandbox access, accounts and structured output.

Capabilities

The page describes running reviews, applying patches and automating tasks such as release preparation and migrations. Tasks can come from inline text or a repository file. Inputs control the model, reasoning effort, sandbox, CLI arguments, CLI version and shared Codex configuration directory.

The action exposes its last response as final-message and can save that response to an output file. Passing --output-schema through codex-args requests a defined JSON structure. These are documented capabilities, not demonstrated results.

Using it

Requirements

The documented setup stores an OpenAI API key in a GitHub secret, checks out the repository and supplies exactly one of prompt or prompt-file. Linux and macOS runners support the documented privilege protections; Windows requires safety-strategy: unsafe.

The runner account needs appropriate checkout access. Trigger authorization also matters: by default, only users with repository write access can run the action, with allow-users and allow-bots providing additional controls.

Mechanism

The action installs the Codex CLI, starts a Responses API proxy when an API key is provided and invokes codex exec with the configured permissions. Later workflow steps or jobs can consume its final response.

The default drop-sudo strategy removes sudo for the remainder of the job. An unprivileged-user strategy offers a separate account-based approach. Sandbox settings control Codex filesystem and network access; the page warns that read-only protection alone does not remove elevated privileges or adequately protect secrets.

Setup

The documented sequence is to store the API key, check out the code, create the task instructions and invoke openai/codex-action@v1. Choose the narrowest usable sandbox, configure trusted triggers and arrange required filesystem permissions before privilege removal.

Set codex-version when a specific CLI release is required; leaving it blank selects the latest published version. The guide recommends running Codex last in its job. For permission failures, it points to checkout ownership and access settings; for proxy startup failures, it directs attention to API key presence and validity.

Example

The sample responds to opened, synchronized or reopened pull requests. Its first job checks out the pull request merge reference with full history and persisted checkout credentials disabled, then runs Codex using .github/codex/prompts/review.md. It saves the final response to codex-output.md and exposes it as a job output.

A separate job posts a nonempty response as a pull request comment using issues and pull-requests write permissions. The referenced review prompt is not included, so its review criteria are unknown. The sample demonstrates feedback posting, without a merge-blocking decision rule.

Assessment & evidence

Limitations

The documentation warns that Codex has broad runner access unless constrained. Pull request text, commit messages and issue bodies can introduce prompt injection, and read-only operation alone is insufficient secret protection. Windows requires unsafe mode, while the page warns against unsafe mode on multi-tenant runners.

The page does not establish data retention, forked pull request secret availability, task success rates or generated-code correctness. No workflow, API request or security behavior was tested. Listed uses such as migrations have no worked example here.

Fit considerations

The integration's practical value is packaging CLI installation, execution and response capture into a reusable workflow step. That supports recurring GitHub tasks, but teams still need to define useful instructions, protect secrets and decide how responses affect development decisions. The documented controls support configuration choices; they do not establish review quality or production readiness.

Alternatives

Managing the Codex CLI directly is an alternative suggested by the action's stated benefit of handling CLI setup. The page links to another CI example in its non-interactive mode guide [https://learn.chatgpt.com/docs/non-interactive-mode]. That guide was not assessed, and this page provides no comparison with competing tools on features, cost or security.

Evidence

The evidence is the complete documentation page at [https://learn.chatgpt.com/docs/github-action.md]. It supports descriptions of inputs, prerequisites, the sample workflow and documented cautions. Linked documentation, repository implementation and example files are outside the available evidence. Implementation behavior and performance remain unverified.

Access & freshness

Costs

Cost is unknown. The page requires an API key for its documented setup but gives no API rates, action charges, runner pricing, usage estimates or per-run totals. It provides no basis for treating the workflow as free or estimating a budget.

Rights

The page states no documentation license, action license or redistribution terms. It also does not establish ownership or reuse terms for generated output, or terms governing submitted repository data. Those rights and conditions remain unknown from this source; the linked repository and service terms were not assessed.

Freshness

The page was captured at 2026-11-14T19:31:17.006Z and contains no publication or update date. It references openai/codex-action@v1, actions/checkout@v5 and actions/github-script@v7. Their current release status and compatibility were not assessed.

The default CLI selection can change because an empty codex-version input requests the latest published release. The page supplies no resolved CLI version or default model identity.

Next steps

Before adopting the example, define the review criteria, choose trusted triggers and confirm runner privileges, checkout access and secret handling. Decide whether a response should merely inform reviewers or drive a separately defined quality gate.

Confirm pricing, licensing and repository-data terms from their respective sources. Pin the CLI version if repeatability matters, then evaluate a controlled workflow for useful output and expected permissions. The supplied page does not establish those outcomes.

Evidence for this report

selected-page.txtselected · checked 2026-11-14