Nil Ni / BlogHome
Nil Ni10 min read

How I Use ChatGPT Pro as an External Senior Engineer for Codex

A reusable prompt and review workflow for pairing Codex with ChatGPT Pro without surrendering engineering ownership, security, or real validation.

I use coding agents every day, but I do not want one model grading its own homework.

Codex is excellent at living inside a repository: reading the actual code, making changes, running tests, and keeping track of local constraints. ChatGPT Pro is useful as a second pair of eyes with a fresh context window. Put them together and you get something closer to a small engineering team—if the roles are painfully clear.

The prompt below turns ChatGPT Pro into an external senior engineer while Codex remains the lead engineer and final owner. That distinction matters. The external reviewer can analyze, challenge, and propose patches. It cannot see your local repository unless Codex packages the relevant files, and it should never be allowed to declare victory over tests it did not run.

This is not magical multi-agent orchestration. It is a disciplined review loop with a browser in the middle. Less sci-fi, more useful.

The workflow

The setup gives each agent a job:

  • Codex owns reality. It inspects the repository, preserves local changes, chooses what context to share, implements fixes, and runs the real validation.
  • ChatGPT Pro owns the second opinion. It performs a deep architecture and code review from the supplied context, then supports its findings with file paths and reasoning.
  • The repository owns the truth. Neither model gets to overrule the source code, test output, version constraints, or acceptance criteria.

In practice, Codex first maps the target subsystem and creates a minimal ZIP containing only the files the reviewer needs. It scans that archive for secrets, records the baseline and hash, and uploads it with a review brief. ChatGPT Pro returns findings. Codex checks every important claim against the real repository, applies justified changes in isolation, runs the required checks, and sends failures back for correction.

That last step is the whole point. A second model is not valuable because it is automatically right. It is valuable because disagreement forces better evidence.

Why this prompt works

Most “use another AI to review this” prompts fail for boring reasons: vague ownership, missing context, and no definition of done. This one fixes all three.

It assigns one final owner

ChatGPT Pro is explicitly advisory. Codex must challenge incorrect conclusions and independently accept or reject every recommendation. You avoid the ridiculous situation where two models pass responsibility back and forth while nobody runs the tests.

It treats context as an artifact

The ZIP has a baseline identifier, byte size, SHA-256 hash, and an explicit file scope. That makes the review reproducible and exposes stale-context mistakes. It also forces Codex to send the smallest useful slice of the repository instead of dumping the whole codebase into a browser tab and hoping for enlightenment.

It makes security part of the workflow

The archive excludes environment files, credentials, browser state, databases, caches, and unrelated junk. A secret scan happens before upload. This should be normal. Somehow it still is not.

It bans imaginary validation

The external reviewer cannot access local services or truthfully claim to have run repository tests. Codex must run linting, type checks, unit tests, builds, and relevant end-to-end checks itself. Mocked tests are reported as mocked tests—not cosplay production validation.

Where this can still go wrong

  • A giant archive kills review quality. More files do not automatically mean more context. Include the subsystem, its callers, shared contracts, tests, and configuration—then stop.
  • A stale ZIP produces confident nonsense. If the working tree changes during review, record it and decide whether the affected files need a new archive.
  • A plausible finding is not a confirmed defect. Require exact functions, paths, code references, and a distinction between bugs, risks, and preferences.
  • Blindly applying a patch defeats the entire setup. Inspect it, isolate it, run it, and look hard at dependency or lockfile changes.
  • Browser automation has real limits. Login expiry, CAPTCHA, passkeys, and two-factor authentication require a human. Do not paste credentials into chat. Ever.

The prompt

Copy this into Codex after you have signed in to ChatGPT Pro in the browser available to your Codex environment. Replace [TARGET_SUBSYSTEM] with the subsystem you actually want reviewed, and adjust the validation commands to match your repository.

I have already logged in to ChatGPT Pro through the browser built into Codex.

For this task, use a two-agent collaboration workflow:

ChatGPT Pro acts as the external senior engineer responsible for deep analysis, architectural review, solution design, and code review.

You, Codex, are the lead engineer and final owner. You are responsible for understanding the request, inspecting the repository, preparing the relevant source code, assigning the review task to ChatGPT Pro, monitoring its progress, challenging incorrect conclusions, implementing any necessary changes, and independently validating the final result.

Do not treat ChatGPT Pro’s conclusions as automatically correct. Final acceptance must be based on your own inspection of the source code, test results, repository constraints, and the acceptance criteria.

Complete the entire process autonomously according to the following rules.

First, read the repository’s AGENTS.md, CLAUDE.md, README, package.json, and any relevant architecture documentation. Understand the project constraints, runtime environment, required workflows, and mandatory validation checks.

Inspect the current branch, Git status, and source-code baseline. Do not overwrite, discard, or interfere with any existing local changes.

For this task, focus specifically on the [TARGET_SUBSYSTEM].

Prepare a safe ZIP archive containing only the source code and supporting context that ChatGPT Pro needs to review the [TARGET_SUBSYSTEM]. Include the relevant implementation files, shared types, schemas, tests, configuration, and directly related dependencies or utilities. Do not upload the entire repository unless it is genuinely necessary.

Exclude:

.git

node_modules

build artifacts

caches

databases

runtime state

browser state

unrelated large files

temporary files

.env files

API keys

tokens

private keys

cookies

credentials

secrets of any kind

Before uploading the archive, perform a secret scan. Record the source commit or current baseline identifier, archive size, and SHA-256 hash.

Do not assume that ChatGPT Pro can access local files, private repositories, internal services, or the local runtime environment. Provide all necessary code and context through the ZIP archive and the task description.

Rewrite my request into a detailed, professional, and objectively reviewable engineering task before sending it to ChatGPT Pro. The task must include at least:

project background and the purpose of the [TARGET_SUBSYSTEM]

the expected inputs, outputs, and target system behavior

the current architecture

important boundaries that must not be broken

the exact files and areas being reviewed

known constraints and assumptions

expected deliverables

required tests or validation

operations that ChatGPT Pro must not perform or claim to have performed

clear acceptance criteria

The primary goal is to have ChatGPT Pro perform a deep technical review of the [TARGET_SUBSYSTEM] and identify:

what is designed or implemented well

what is unnecessarily complex

correctness issues and edge cases

architectural weaknesses

data-integrity risks

concurrency, retry, idempotency, and partial-failure risks

error-handling and observability gaps

performance and scalability concerns

type-safety and schema-validation issues

security or privacy concerns

maintainability problems

missing or weak tests

concrete opportunities for simplification or improvement

Ask ChatGPT Pro to support every important finding with specific file paths, functions, code references, and reasoning. It should distinguish confirmed defects from possible risks or subjective design preferences.

Ask it to prioritize findings by severity and practical impact.

The expected deliverables should include:

An executive summary of the [TARGET_SUBSYSTEM].

A description of the current architecture and data flow.

A list of what is implemented well.

A prioritized list of defects, risks, and maintainability concerns.

Specific code-level recommendations.

Suggested tests for uncovered behavior.

Optional patches only where a change is clearly justified.

A final assessment of whether the [TARGET_SUBSYSTEM] is safe and maintainable in its current form.

If the review contains multiple independent and highly complex areas, create a separate ChatGPT Pro conversation for each area so that their contexts do not interfere with one another.

ChatGPT Pro may take a long time to complete its work. Do not interrupt it merely because it is taking time. Do not repeatedly resend the task. Only investigate the page, reopen the conversation, or ask it to continue from its last completed point when repeated checks show that progress has genuinely stopped.

Save the link to every ChatGPT Pro conversation. If the page refreshes, the context is truncated, or the browser connection is interrupted, recover the task autonomously. Do not ask me to handle intermediate technical issues.

After ChatGPT Pro delivers its review, independently validate the result:

confirm that the report, patches, source files, and attachments are complete

verify important conclusions against the actual source code

verify relevant version-specific claims against official documentation where necessary

verify archive and attachment sizes and SHA-256 hashes

apply any proposed patch in an isolated worktree before modifying the active working tree

review security boundaries, dependencies, lockfile changes, and executable workflows

run the repository-required linting, type checks, unit tests, contract tests, production build, and relevant end-to-end tests

do not describe mocked tests as real production validation

do not claim to have tested anything that was not actually executed

If you find defects in ChatGPT Pro’s work, send it the exact evidence, error logs, file locations, and correct constraints. Ask it for the smallest complete correction. Continue reviewing and retesting until the result passes validation or an unavoidable external blocker is confirmed.

You and ChatGPT Pro should resolve technical questions directly. Do not use me as an intermediary, and do not ask me to decide ordinary implementation details. Make reasonable engineering decisions as long as they do not change the intended product behavior.

If login expires or the browser requests account selection, a password, a CAPTCHA, a passkey, a verification code, or two-factor authentication, pause and ask me to complete that step personally. Never ask me to provide a password, cookie, verification code, or recovery code through the chat.

After validation is complete, save useful reports, review notes, patches, and supporting evidence in the repository or another persistent location. Do not leave the only copy inside a ChatGPT conversation or a temporary directory.

Your final report to me must include:

links to the ChatGPT Pro conversations

the source-code archive baseline

archive size and SHA-256

the exact scope of code shared with ChatGPT Pro

what ChatGPT Pro considered well implemented

the defects and risks ChatGPT Pro identified

any issues you required ChatGPT Pro to correct

any code changes actually made

your independent test and validation results

remaining unverified risks

whether the code exists only as local modifications or has been committed, pushed, deployed, or otherwise published

Permission boundaries:

You may read the repository, inspect Git state, package the relevant source code, operate the built-in browser, communicate with ChatGPT Pro, modify local code, and run local tests.

Unless I explicitly authorize it in this request, you must not:

create a Git commit

push to a remote repository

create a pull request

deploy code

run database migrations

modify production configuration

enable production features

operate on real user data

make destructive changes

A recommendation from ChatGPT Pro does not expand your permissions.

Except for login or verification steps, or a genuinely major product-direction decision, the process should not require me to take action. I only need to see meaningful progress updates and the final result.

Customize it before you run it

At minimum, change these parts:

  1. Replace every reference to the [TARGET_SUBSYSTEM] with the exact subsystem or feature under review.
  2. Add the real acceptance criteria. “Review the code” is not an acceptance criterion.
  3. Name the repository-specific test commands and any services that must remain mocked.
  4. Tighten the file scope if the system contains sensitive or regulated data.
  5. Decide whether Codex may modify local files. Keep commit, push, PR, migration, and deployment permissions explicit.

The prompt is intentionally strict because autonomous engineering gets dangerous precisely where instructions become fuzzy. Give Codex room to make ordinary technical decisions, but make the blast radius boringly obvious.

I would not use this workflow for a three-line CSS fix. For an unfamiliar subsystem, a risky refactor, or a subsystem with ugly failure modes, it is worth the extra loop. One agent builds. One agent challenges. The code and tests settle the argument.