Terms in this guide: Acceptance criteria · Verification
Check instruction scope and conflicts before rewriting AGENTS.md.
Map the instruction files
Identify the global instructions and the project instruction files that apply to the directory you are working in. Codex builds an instruction chain from broader context toward the working directory; a nearer instruction can change an earlier one. AGENTS.override.md has special precedence within its directory.
Use the official documentation for exact discovery behavior and limits. The practical debugging task is to locate the applicable files and compare their meaning, rather than assuming a single file controls every session.
Choose an observable instruction
Pick a small rule whose effect is easy to see: the documented test command or the location of a component. Ask the session to identify that rule and its source before doing a larger task. If the answer points somewhere unexpected, investigate scope first.
Start a fresh session after editing instruction files so the next check begins from the updated instructions. Keep the test task the same when comparing results.
Resolve contradictions
Look for rules that ask for incompatible behavior. Examples include always running every check while forbidding the required setup, or demanding a particular output format that omits the requested evidence. Rewrite the conflicting rule to say what should happen in the real situation.
Keep factual instructions current. An obsolete command can make a well-followed instruction look like poor task execution. Confirm commands against the repository before adding them to the file.
Keep the briefing short enough to maintain
Prefer a concise map, actual validation commands, and important boundaries. Move long explanations into linked project documentation. Review the file when the repository structure or development process changes.
Primary source: AGENTS.md discovery and precedence. Source checked September 10, 2026.
Progress stays in this browser. No account needed.
Updates and upgrade guidance
- Learning context added
Added prerequisites, a suggested practice estimate, expected output, and connected definitions. The article procedure was not independently re-evaluated in this change.
What to do: Use the opening checklist to prepare. No software update is required for this editorial change.
This log starts with the first recorded review; it is not a reconstruction of earlier revisions.