# Codex setup in 1 hour

A time-boxed first session: connect a project, give clear instructions, and verify one small change.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Before you start

Allow extra time for downloads, account access, or company approvals. Use a disposable sample repository and an editor. Install the runtime required by that project from its official vendor. This is a suggested 60-minute lab, not an installation-time guarantee.

## Minutes 0–10 · Choose your interface

Desktop: follow the official quickstart, sign in, select Codex for software work, and open your project folder. Terminal: open the official CLI page and choose the installer for your OS. Do not install multiple copies unless you need them. Windows users should follow the Windows-specific instructions on the provider page.

## Minutes 10–20 · Confirm your workspace

In your terminal, change to your actual project folder and inspect Git state. Replace the example path before running it.

cd /path/to/your/project
git status

For CLI users, run codex and complete the offered sign-in flow. Choose only the folder and permissions needed for the exercise. Keep API keys out of prompts and Git.

## Minutes 20–30 · Explain the project

Starter prompt:
Read the README and applicable AGENTS.md. Explain the project structure, setup commands, and test commands. Identify missing prerequisites. Do not edit files yet.

Compare its explanation with the repository. Resolve missing dependencies before asking for code changes.

## Minutes 30–45 · Make one small change

Choose a text correction or a small validation fix. State the file or feature, expected behavior, and a concrete acceptance check. Ask Codex to preserve unrelated work and use the existing stack. Review the proposed commands and resulting diff.

## Minutes 45–60 · Verify and review

Run the checks documented by your project, inspect git diff, and open the changed screen or execute the changed behavior. Ask Codex to report which checks actually ran and what remains unverified. Commit only the intended files after reviewing them.

## If setup fails

Command not found: reopen the terminal and check the installer’s PATH guidance. Sign-in unavailable: check your account/workspace access. Missing dependencies: follow this repository’s README. Permission denied: inspect the selected folder and permission settings rather than disabling protections globally.

## Official references

- https://learn.chatgpt.com/docs/quickstart
- https://learn.chatgpt.com/docs/codex/cli


---

# Codex command quick reference

A small set of terminal and interactive commands to keep beside your first project.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Terminal entry points

codex — start an interactive session in the current folder.
codex --help — inspect commands supported by your installed version.
codex resume — return to a previous session.
git status — inspect the working tree.
git diff — review unstaged edits.

## Inside an interactive CLI session

/status — inspect the session.
/permissions — review access boundaries.
/model — choose from available models.
/init — create repository instructions; review the result.
/review — request a change review.

Slash commands belong in Codex, not your system shell. Availability can change; use the installed help and official reference.

## Reliable working loop

Explore → define one outcome → implement → run relevant checks → inspect diff → decide whether to commit. Do not equate a successful command with a correct feature.

## Official references

- https://learn.chatgpt.com/docs/codex/cli


---

# AGENTS.md starter template

Give Codex durable, repository-specific setup and verification guidance.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Where instructions belong

Use AGENTS.md at the repository root. Add more local instructions only when a subdirectory needs different rules. Review existing instructions before adding another file. More specific instruction files can override earlier guidance.

## Copy and adapt this template

# Repository instructions

## Purpose
Describe this project and its users.

## Setup
List the exact supported runtime and dependency install command.

## Verification
List existing test, lint, typecheck, and build commands.

## Boundaries
Preserve unrelated changes. Never commit secrets or real customer data.
Use existing conventions. Explain failures and unverified behavior.

## Delivery
Summarize changed behavior and actual checks. Review changes before publishing.

## Verify the instructions

Start a fresh session in the project. Ask Codex to identify applicable instructions and summarize the test commands. Check the output against your files. README.md and PROJECT.md are useful documentation, but do not assume every Markdown file is automatically loaded as instructions.

## Official references

- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Codex task prompt patterns

Reusable prompts for exploration, implementation, debugging, and review.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Explore

Read the applicable instructions and map the execution path for [feature]. Identify its inputs, outputs, tests, and risks. Report findings before changing code.

## Implement

Implement [specific behavior] in [scope]. Preserve [constraints]. Reuse existing components. Acceptance: [observable result]. Run [documented checks] and explain any verification gap.

## Debug

Reproduce [failure] using [steps and sanitized sample]. Find the cause before editing. Add a regression check where useful, make the smallest complete fix, and show the before/after behavior.

## Review

Review this diff for correctness, security, and regressions. Prioritize actionable issues with file locations, impact, and a reproduction or test. Do not change files during the review.

## Improve your context

Attach relevant files, exact errors with secrets removed, and expected behavior. Split unrelated tasks. Say which actions are authorized and whether external publishing is included.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# OpenAI API environment checklist

Prepare a server-side API experiment without mixing up Codex access and application credentials.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Separate the two accounts of access

Signing into Codex does not automatically configure API credentials for your application. Check your OpenAI project access, billing, model availability, and usage limits on the provider platform.

## Prepare a sample app

Use a separate project folder, a supported runtime, and the official SDK instructions linked below. Store OPENAI_API_KEY using your local environment or secret manager. Ignore local secret files in Git. Never put the key in a browser bundle, mobile client, prompt, or screenshot.

## Ask Codex to build a first request

Create a minimal server-side example using the current official OpenAI quickstart and an available model. Read the API key from the environment. Use a synthetic input. Handle missing credentials and API failures without logging secrets. Explain how to run it and expected usage costs.

## Verify before expanding

First test input validation and error handling with mocks. Then run one explicitly authorized live request with a small input and a spending limit. Check output, latency, failure behavior, and usage. A mock passing does not prove the live API works.

## Official references

- https://developers.openai.com/api/docs/quickstart


---

# Codex setup troubleshooting

Diagnose setup failures without broad resets or deleting project work.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Environment problems

Record the exact error and current folder. Check the project runtime against its README. Inspect the lockfile and use the repository’s package manager. Do not delete dependency locks or reset a database just to make a command pass.

## Access problems

Check account eligibility, selected workspace, and permissions. CLI users can inspect /status and /permissions. For an application API failure, check its project credentials separately from Codex login. Never paste a token into a help request.

## Unexpected edits

Stop the task, inspect git status and git diff, and identify which changes are yours. Ask for a targeted correction. Avoid broad restore/reset commands that could discard unrelated work.

## Incomplete validation

Request the exact commands executed, their results, and missing prerequisites. If database, browser, or external-service checks did not run, retain that limitation in the handoff.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://developers.openai.com/api/docs/quickstart


---

# Use case 01: Explore an unfamiliar repository

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Existing cloned repository; Git; runtime specified by README.

## Environment setup

Open the repository root. Read README and lockfiles before installing anything. Prepare a scratch notes file outside application code.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Map entry points, dependencies, data flow, and test commands without edits.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Trace one real feature from input to output and verify every referenced path exists.

## Troubleshooting

If documentation disagrees with code, record the discrepancy and follow executable evidence.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 02: Build a responsive landing page

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

A web project with an existing development script; browser.

## Environment setup

Use the project’s current frontend stack. Start its documented dev server on an available port. Prepare a content outline and a mobile wireframe.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Build a responsive landing page using existing components with clear headings and keyboard-accessible links.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Check 320px and desktop widths, keyboard focus, real navigation targets, and reduced motion.

## Troubleshooting

If the preview is blank, inspect server output and browser errors before changing the layout.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 03: Create a React form

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Existing React app; form endpoint contract or local mock.

## Environment setup

Use synthetic input. Document required fields, validation rules, and success/error responses before implementing.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Create an accessible inquiry form with labels, pending state, validation, and retryable errors.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Test invalid email, empty fields, failed request, success, and duplicate-click protection.

## Troubleshooting

If submission fails, separate client validation from server rejection; do not show success for failed requests.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 04: Create a server API endpoint

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Server application; HTTP client; local test environment.

## Environment setup

Read route conventions. Define request and response shapes. Use a mock storage adapter until a disposable database is ready.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Add one validated endpoint following existing conventions; avoid exposing internal errors.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Exercise valid input, malformed input, unknown fields, and storage failure.

## Troubleshooting

If requests return 404, confirm server port, method, and route registration.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 05: Build an OpenAI text assistant

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Server runtime; official SDK; project API access for a live smoke check.

## Environment setup

Keep credentials server-side. Define a small input limit, output contract, and mocked API response.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Build a minimal assistant using the current official quickstart. Handle missing credentials, timeout, and provider failure.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Run mock tests first; with authorization, make one bounded live request and inspect usage.

## Troubleshooting

For authentication errors, verify the application project key; Codex login is separate.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart


---

# Use case 06: Extract structured data

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Server app; synthetic text fixtures; schema validator.

## Environment setup

Define required output fields and invalid examples. Review the current API structured-output guide before implementation.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Extract invoice fields from synthetic text into a validated schema. Flag missing evidence rather than inventing values.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Test missing fields, malformed input, and model refusal/error handling.

## Troubleshooting

If parsing fails, inspect the actual response type and schema; avoid brittle substring extraction.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart


---

# Use case 07: Build a document retrieval prototype

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Local server; approved sample documents; storage isolated from production.

## Environment setup

Create a tiny document set with known answers and unanswerable questions. Record provenance and deletion requirements.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Implement a retrieval prototype using current OpenAI guidance. Cite retrieved evidence and abstain when unsupported.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Check grounded answers, irrelevant queries, deleted documents, and malicious text inside a document.

## Troubleshooting

If answers are unsupported, inspect retrieved context before tuning the prompt.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart


---

# Use case 08: Add a tool-using assistant

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Server app; mock tool functions; explicit tool input schemas.

## Environment setup

Begin with a read-only inventory lookup over synthetic data. Keep real writes disabled and validate tool arguments on the server.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Add a tool-based lookup with allowlisted functions, argument validation, and bounded retries.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Test unknown tool names, invalid IDs, tool failures, and instructions embedded in tool output.

## Troubleshooting

If tool calls loop, inspect stop conditions and enforce a step limit.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart


---

# Use case 09: Create an evaluation harness

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Local test runner; representative synthetic cases; saved expected outcomes.

## Environment setup

Define pass/fail criteria before running models. Keep a fixed holdout set and separate live API tests from offline checks.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Build an evaluation runner that records case IDs, expected behavior, results, latency, and failures.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Include easy, edge, and adversarial cases; confirm a deliberately bad result fails.

## Troubleshooting

If scores vary, inspect test ambiguity and sampling instead of moving the success threshold.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 10: Debug an existing bug

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Reproducible project checkout; sanitized failure steps.

## Environment setup

Capture baseline behavior and current Git diff. Install locked dependencies and isolate one failing case.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Reproduce the defect, explain the cause, implement a focused fix, and add a regression check.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Show the failing case before the fix and passing case afterward; run nearby tests.

## Troubleshooting

If you cannot reproduce, compare runtime versions and inputs before guessing a fix.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 11: Add unit tests

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Existing test framework; one module with stable behavior.

## Environment setup

Identify public behavior and edge cases. Reuse existing fixtures; avoid coupling tests to private implementation.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Add meaningful tests for this module, including boundary inputs and a failure path.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Confirm a deliberate behavioral regression would fail at least one test.

## Troubleshooting

If tests are flaky, replace timing and network dependencies with deterministic controls.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 12: Add browser interaction tests

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Web app; installed browser test runner; disposable local server.

## Environment setup

Use the project’s existing browser runner. Define a single user journey and seed synthetic data.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Test navigation and form completion with accessible locators, including one failure path.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Check the result displayed to the user, keyboard use, and mobile layout.

## Troubleshooting

If selectors fail, inspect the rendered page and prefer stable accessible names.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 13: Review a pull-request diff

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Git repository; known base and head revisions.

## Environment setup

Record the comparison range and uncommitted work. Review instructions first. Keep the session read-only.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Review the selected diff for regressions, with impact, location, and concrete evidence for each finding.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Verify findings against surrounding code and existing tests; distinguish uncertainty from confirmed defects.

## Troubleshooting

If the diff is empty, verify the intended revisions rather than assuming no changes exist.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 14: Refactor a legacy module

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Existing codebase; baseline tests; documented behavior.

## Environment setup

Choose one bounded module. Record interfaces and callers. Add a behavior check before structural changes.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Simplify this module while preserving public behavior and avoiding unrelated dependency upgrades.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Compare behavior before and after; run callers’ tests and inspect exported interfaces.

## Troubleshooting

If tests fail broadly, reduce the refactor scope and isolate the behavioral change.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 15: Prepare a database migration

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Disposable local database; migration tool already used by the repository.

## Environment setup

Create a synthetic seed and a local backup. Document compatibility and recovery; never point the exercise at production.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Draft a versioned migration for the requested change with validation queries and a recovery plan.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Apply to an empty and a representative seeded database; inspect constraints and existing records.

## Troubleshooting

If migration history differs, investigate drift; do not drop the database as a shortcut.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 16: Containerize a development app

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Docker installed; existing app with a verified local start command.

## Environment setup

Identify runtime, build steps, ports, and secret injection. Use a local-only disposable environment.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Create a minimal container setup with a non-root runtime where supported and no baked-in secrets.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Build, start, check health, restart, and verify expected persistence and port bindings.

## Troubleshooting

If the container exits, inspect logs and process startup rather than disabling health checks.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 17: Add continuous integration checks

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Repository with passing local checks; existing CI provider or a chosen sandbox repository.

## Environment setup

List required commands and runtime versions. Keep secrets and deployment steps out of the initial workflow.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Add a CI workflow that installs locked dependencies and runs lint, types, tests, and build as applicable.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Validate workflow syntax and review permissions; verify an actual run separately after authorized publication.

## Troubleshooting

If CI differs from local, compare environment variables, operating system, and dependency cache state.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 18: Improve accessibility

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Running web app; browser; a specific page or interaction.

## Environment setup

Record keyboard order, headings, labels, focus visibility, and contrast. Preserve current content and behavior.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Fix the observed accessibility barriers using semantic HTML and existing design conventions.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Navigate without a mouse; test zoom, narrow width, error announcements, and reduced motion.

## Troubleshooting

If an automated scan passes, still inspect interaction behavior; scanning is not a complete audit.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 19: Write a developer handoff

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Repository checkout; working commands and known limitations.

## Environment setup

Gather actual setup and validation evidence. Separate implemented behavior from planned features.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Update README and a concise handoff with setup, architecture, checks, limitations, and next steps.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Follow the instructions in a fresh disposable checkout when feasible; verify paths and commands.

## Troubleshooting

If a step cannot be reproduced, label it unverified instead of presenting it as complete.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md


---

# Use case 20: Package a reusable team workflow

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

An established repeatable task; repository instructions; representative examples.

## Environment setup

Start with an ordinary documented workflow and success criteria. Use AGENTS.md for durable repo guidance; only package a skill if reusable task instructions justify it.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Document this repeatable task with inputs, steps, outputs, failure handling, and verification. Avoid adding tools or services without need.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Try it on a normal case, an edge case, and a failure; record limitations and refine instructions.

## Troubleshooting

If the workflow is too broad, split it by outcome rather than accumulating contradictory rules.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
