ChatGPT, Codex, and AI

Codex: turn a scoped task into a reviewed, tested change

Devin De Frisco
Devin De Frisco

Optional technical track: This guide is for SBS faculty and staff who maintain code, scripts, websites, or configuration. The outcome is a small, understandable change with evidence that it works—not a promise that every possible problem has been eliminated.

Codex works best when you define the finish line before it edits anything. Give it the project, the exact outcome, the boundaries, and the checks that should pass. Keep sensitive SBS information out of prompts, logs, and commits.

Start with a bounded task

  1. Name the result. Describe what a user should be able to do after the change.
  2. Set the scope. Identify the folder, feature, or files that may change, and say which areas are out of scope.
  3. Define evidence. Name the relevant tests, build, lint check, or manual behavior to verify.
  4. Ask for a plan when the path is uncertain. Have Codex inspect first and explain its proposed files, risks, and validation. For a small, obvious fix, a separate planning phase may add little value.
  5. Ask it to implement and persist. Codex should preserve unrelated work, make the smallest sufficient change, run the agreed checks, and report failures plainly.

Worked prompt

Inspect this repository and fix the broken faculty-directory filter.
Scope: the directory page and its existing tests only. Preserve unrelated changes.
First explain the likely cause and a short plan. Then implement the smallest fix.
Run the relevant tests and build. Review the final diff for regressions, privacy,
and accessibility. Report changed files, test results, and anything not verified.
Do not commit, push, deploy, or change dependencies.

Review before you accept

The desktop review pane requires a Git repository. If you are working with ordinary files, compare the before-and-after files and open the result in its intended application.

Open the Codex review pane and choose the scope that matches your question: Last turn for the latest response, Unstaged or Staged for local work, Commit for one commit, or Branch for the complete branch difference. The pane reflects the repository state, including edits you made yourself. Read every changed file; check behavior, error handling, accessibility, secrets, and unexpected files. You can also run /review and choose uncommitted changes or a base branch for prioritized findings without changing the working tree.

Tests are evidence, not approval. Confirm that the reported command actually ran, the test covers the changed behavior, and the result is appropriate for SBS use. A human remains responsible for the final decision and any production release.

Official Codex review illustration showing an inline finding attached to changed code.
Review findings alongside the changed lines. Screenshot of OpenAI’s official code-review illustration.

If the task goes off track

  • Stop the run. Ask Codex to summarize the current diff and separate required changes from optional cleanup. Revert only the specific unwanted files or lines after reviewing them.
  • Ask for the exact failing command, error, and whether the failure existed before the edit. Fix only when it is in scope; otherwise record it as unverified or blocked.
  • Check whether Codex is waiting for approval, open the terminal, and run git status. If needed, start a fresh task with a smaller prompt and the authoritative requirements.
  • Cancel the run, then press the up arrow in the composer to recover the previous prompt. Verify the current directory and branch before continuing.

Related SBS guides

Official guidance

Official guidance checked September 16, 2026. Features vary by product surface and workspace settings.