An overnight agent finishes a patch. The terminal says it is done, but the branch still needs review. We want a second look at the actual diff, not another summary of what the builder intended to do.
Codex code review gives us a focused inspection step inside the repository. On a VPS, the useful question is not just “did review run?” It is “which files and revision did it inspect, and who decides whether they ship?” This guide describes a manual Codex CLI workflow, not an automatic Office Claws merge feature.
Codex code review: choose the right diff
OpenAI's CLI overview describes dedicated review of uncommitted work, a commit, or changes against a base branch. Its review guide distinguishes checkout review from pull-request review. We use the checkout path on our own runner.
| Target | CLI command | Good fit | Easy mistake |
|---|---|---|---|
| Working tree | codex review --uncommitted | Inspect work before committing | Another worker keeps editing the files |
| Branch | codex review --base origin/main | Inspect a feature against the integration branch | The remote-tracking reference is stale |
| One commit | codex review --commit <SHA> | Investigate the change introduced by a known commit | Treating one commit as the entire feature |
The current CLI argument definitions make these targets mutually exclusive. They also disallow a positional custom prompt with these selectors. Check the installed version's help rather than combining flags from unrelated examples. The uncommitted target includes staged, unstaged and untracked changes; inspect for secrets before sending repository context to a model.
Run your first agent in about 3 minutes
Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.
curl -fsSL https://officeclaws.com/downloads/install.sh | sh$4.99/mo + your own Contabo VPS · keys stay in your keychain
Pin the handoff before starting review
We finish the builder's edits and commit the intended patch before branch review. We stop other writers to that checkout. Replace the example path and base branch with your repository's values; fetching updates Git references but does not merge into your branch.
cd ~/work/product-api
codex --version
codex review --help
git fetch origin
git status --short
git rev-parse HEAD
git rev-parse origin/main
git diff --stat origin/main...HEAD
codex review --base origin/mainRecord both printed commit IDs beside the findings, along with the Codex version. The three-dot diff is a useful preview of the branch change from its merge base, not a promise that every review implementation uses identical internal context. If the diff is empty or contains unrelated work, fix the handoff before spending a review run.
For parallel builders, use a separate checkout or worktree for the review candidate. A worktree isolates working files, not Unix credentials or the network. Do not review a moving target while another process rebases or checks out a different branch. Our parallel workflow guide covers task boundaries; this step fixes the identity of the artifact being inspected.
After any fix, the old findings still describe the old state. Rerun the relevant tests and review the updated candidate. If the integration branch moved, inspect the new base relationship too; a clean earlier review is not evidence about a later merge result.
Turn findings into evidence, not a green light
A completed review process is not an approval. Do not use its shell exit status as a defect count or parse “no findings” as proof of safety. We read each concern against the referenced code and expected behavior.
For each actionable finding, retain the triggering input, file and line, expected versus actual behavior, and a regression test where practical. If a reported bug cannot be reproduced, document why rather than applying a speculative rewrite. If review cannot access dependencies or a required service, keep that limitation visible.
Run the project's actual checks separately. A useful handoff includes the reviewed head and base IDs, test commands and results, unresolved findings, and the human merge decision. Authentication changes, schema migrations and credential handling deserve deliberate review even when the agent reports nothing.
OpenAI describes dedicated review as reporting findings without modifying the working tree. Asking an agent to apply fixes is a separate editing step. That distinction is not an operating-system security boundary: keep sandbox and approval settings appropriate, and do not put production deployment credentials on a review runner merely to inspect a diff.
Keep review and deployment separate on your VPS
Office Claws runs Codex-backed agents on VPS infrastructure you control and provides the desktop/CLI operating layer. It does not turn the commands above into a guaranteed policy engine or an automatic PR approval. Use SSH access to inspect the checkout and keep logs available for the operator.
A second review run still uses model access. Bringing a ChatGPT plan does not make review unlimited or remove plan limits; local CLI review and hosted pull-request review are different workflows. Check your current entitlement and our subscription guide before increasing concurrency.
Our recommendation: start with one finished branch, one explicit base, one recorded revision pair and one human merge gate. Add automation only after you can explain what it reviews, where the evidence lives and what prevents an unreviewed revision from reaching production.