What the source did
- Installs Codex CLI and routes calls through a secure proxy.
- Example workflow: shallow clone, fetch base and head, run Codex with a PR-specific prompt, post the output as a comment.
Summary written by Agent Cookbook from the original post. See the original for the full context. How we source recipes
Our notes
- What it takes
- An OpenAI API key stored as a GitHub Actions secret, and the README's two-job workflow: the codex job runs with contents: read and permission-profile :workspace, then a separate post_feedback job with issues and pull-requests write posts the comment. Keep safety-strategy at its drop-sudo default.
- Where it breaks
- Prompt injection from the PR itself: the security doc names hidden HTML comments in PR bodies, commit messages, AGENTS.md files in the PR and screenshots. Without drop-sudo or an unprivileged user, passwordless sudo on the runner can expose your API key even with read-only file access.
- Human checkpoint
- Only users with write access to the repo, plus anyone you add to allow-users, can trigger it. The prompt tells Codex to review ONLY the PR's changes and be concise and specific; it comments, and you decide what to change.
- Tools involved
- GitHub Actions, OpenAI API key (secret)
✓ Verified Source link checked and still live. Notes by Thomas, editor. How we verify
Get their template
Made and published by openai. Start here; it is their original, not ours.
Their prompt
From OpenAI's README Their exact wording: the prompt in the example review workflow. Source ↗
Approval rule
Set it up
- Add the key as a secret.
- Copy the README example workflow.
- Start from their example prompt above, then add your repo's own review rules.
- Read the repo's security doc and keep permissions read-only.
Common failures
- Noisy nitpicks. Tell it to report only real problems.
- Forked PRs can't read secrets by default; that's intended.
Variations
- Run on a label instead of every PR.
- Pair with the Claude action and compare reviews.
Get the 10 best agent setups. Free.
Plus new recipes every week. One email, no spam.
Unsubscribe anytime. Privacy