“Keep the price unchanged, avoid new packages, and check your work” should not need retyping for every website edit. AGENTS.md stores these working agreements with a project. Codex reads applicable instruction files when a run starts. The file helps establish expectations; reliable delivery still needs an inspected diff, executable checks and the actual rendered result.

Our example: one closing-time change

Andaman Laundry is a fictional practice website. We ask Codex to change Saturday closing time from 17:00 to 16:00, retaining the 09:00 opening time. The fictional shop’s wash-and-fold price is 80 THB/kg, sold at the counter. Other opening hours and the 48-hour turnaround must remain unchanged.

The recorded demonstration used Codex CLI 0.171.0-alpha.13 on a Mac on November 23, 2026. That is the installed alpha build, not a claim about everyone’s current version. It changed one file, passed six preservation checks and returned the response format specified in the website folder.

1. Start in the correct directory

You need Git, Python 3 and Codex CLI. If Codex is not installed, follow OpenAI’s CLI setup instructions and its sign-in flow. Check your account’s access and billing channel; this guide does not assume identical access or quotas across plans.

Download the AGENTS.md practice package, unzip it, and open Terminal in its starter directory. Check your location with pwd and the files with ls. Use the fictional files rather than client information or credentials.

cd /path/to/starter
git init
git add .
git commit -m "Save practice starter"
codex --version
python3 check.py

The commit saves a baseline for the diff. If Git asks for your identity, configure your own name and email first. The folder structure is:

starter/
  AGENTS.md
  check.py
  site/
    AGENTS.md
    index.html

2. Write repository and folder instructions

The root file names the facts to preserve and a check that really exists:

# Fictional laundry practice repository
- Keep edits small. Preserve all prices and service claims unless the request explicitly changes them.
- Do not install packages or deploy this practice site.
- Before finishing, run `python3 check.py` from the repository root.
- Report the actual files changed and actual check results. Do not claim browser verification without opening the page.

site/AGENTS.md narrows the edit scope and specifies the final response:

# Website folder
- Keep the visible page in English and preserve the fictional-business notice.
- Only edit index.html for a content-only change.
- Finish with the headings Changed, Checked, Needs review.
- End your response with the marker SITE-RULES.

SITE-RULES is a demonstration marker, not a built-in Codex command. You do not need it in a production project.

Recorded instruction summary — readable transcript excerpt, moment 01
Recorded instruction summary — readable transcript excerpt, moment 01 Exact recorded moment

3. Launch a fresh session and request a small edit

Start from site so startup discovery covers both directory levels:

cd site
codex

Ask for the rules first, followed by the change and checks. Our recorded run used codex exec in workspace-write mode from the same directory to preserve a continuous JSONL event record. That is the noninteractive CLI surface; its output is not a screenshot of the interactive codex interface.

First summarize the applicable instruction files and their rules.
Then change Saturday closing time to 16:00.
Follow the repository instructions, run the checks,
and report the exact change. Do not deploy.

Inspect the resulting diff. In the recorded run, only site/index.html changed, replacing the Saturday closing time. The final response used Changed, Checked and Needs review, followed by SITE-RULES.

Six preservation checks and the actual diff — transcript excerpt, moment 02
Six preservation checks and the actual diff — transcript excerpt, moment 02 Exact recorded moment

4. Check the request and what stayed unchanged

check.py protects weekday hours, Sunday closure, price, turnaround, the fictional-business notice and viewport metadata. All six checks passed. These checks do not assert the new Saturday time. We separately checked the diff and verified that the complete output file equals the starter with exactly one substitution: Saturday: 09:00–17:00 to Saturday: 09:00–16:00.

cd ..
python3 check.py
git diff --check
git diff -- site/index.html

Next open the actual result. From the project root, start a local server and visit its local address:

python3 -m http.server 8819 --bind 127.0.0.1 --directory site
# Open http://127.0.0.1:8819/

Check Saturday 09:00–16:00, the 80 THB/kg price and 48-hour service on desktop and mobile. Look for overflow or hidden text. Stop the server with Ctrl+C when finished. Our inspection of the finished page at 1440 and 390 pixels showed all required content with no horizontal overflow. The author performed this browser check after the CLI session, which had been instructed not to open a browser.

Actual finished page: desktop and mobile browser captures
Actual finished page: desktop and mobile browser captures

5. Understand what AGENTS.override.md replaces

Create site/AGENTS.override.md with the following contents, then start a fresh read-only session:

# Temporary website instruction test
- This is a read-only instruction check: do not modify any files.
- Report with the headings Observed and Limitations.
- End the response with OVERRIDE-RULES.

OpenAI documents a maximum of one nonempty instruction file per directory, trying AGENTS.override.md before AGENTS.md and configured fallback names. A site-level override therefore replaces that directory’s regular file while retaining the repository-root guidance.

For a second, fresh read-only run, we added site/AGENTS.override.md requiring no edits, headings Observed / Limitations, and the marker OVERRIDE-RULES. The response used that format. Separately, the startup instruction record contained the root price-preservation rule and OVERRIDE-RULES, but not SITE-RULES.

The model’s account of its instructions is not enough on its own, so we checked startup records separately from its later file reads and response. Existing global instructions also loaded. This was not a controlled experiment showing that AGENTS.md alone caused every behavior.

Fresh override session — readable transcript excerpt, moment 03
Fresh override session — readable transcript excerpt, moment 03 Exact recorded moment

If the result looks wrong

  • Missing folder guidance: check pwd and launch a fresh session from site. Do not assume every nested instruction file loads.
  • Edited instructions seem ignored: restart the session and look for AGENTS.override.md replacing the regular file at the same level.
  • Checks pass but the page is wrong: inspect what the tests cover and open the actual result. This exercise checks Saturday separately from its six preservation checks.
  • Finished the override experiment: remove or rename that experimental override before returning to normal folder instructions, then start fresh.

Turn working agreements into checks

Keep recurring project expectations at the root and specialized guidance close to the relevant code. Name commands that exist, keep secrets out, and replace vague demands for perfect work with concrete acceptance criteria. OpenAI documents a default combined instruction limit of 32 KiB; keep guidance concise and start a fresh session after changing it.

Use AGENTS.md to make the starting context consistent. Use the exact diff, meaningful checks and the rendered result to decide whether the work is ready to release.

Practice files and image provenance

The package contains starter and finished files, the experimental override, the first input, and continuous JSONL records of both sessions. The text illustrations are readable excerpts from those records, not original terminal screenshots. The finished-page figure uses actual browser captures. The Gemini-generated cover depicts a fictional laundry, with the official OpenAI mark identifying the product; it does not imply endorsement.

Product documentation checked November 23, 2026. The paste-ready prompt is a shorter version of the recorded request; evidence/first-input.txt contains the full input. That CLI run was instructed not to use a browser, and the author inspected the website afterward. The logs include alpha configuration warnings; we do not treat the model’s claim of no external services as network evidence.