In some Codex environments — particularly editor-integrated sessions —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xxyoudeadpunkxx/canon-boundary-guard-codex/llms.txt
Use this file to discover all available pages before exploring further.
AGENTS.md instructions appear as a leading user-role message before the operator’s real first request. Canon Boundary Guard includes a countermeasure for this case: a dedicated classification rule that recognises the block by its header shape and assigns it the correct authority layer before any later messages are interpreted.
The Problem
The leading block may refer to the current working directory even when the actual instruction source is global — for example, anAGENTS.md stored in the Codex home directory rather than in the repository itself. Because the block is delivered over the conversation channel, its displayed role is user, which is the same role the operator uses for ordinary requests.
The displayed conversational role is therefore not enough to decide authority. Treating the block as an ordinary user message would conflate operator-authored intent with agent-control guidance, and treating it as project content would risk persisting runtime instructions into repository files.
The Classification Rule
A leading user-role block whose content begins with:What L2A Means
L2A is the Codex Instruction Chain layer. From the SKILL.md definition:- Global-scope guidance comes from the Codex home directory (
AGENTS.override.mdorAGENTS.md). - Project-scope guidance comes from
AGENTS.override.md,AGENTS.md, or configured fallback instruction files in the current repository path. - A message beginning with
AGENTS.md instructions for <path>is runtime-delivered AGENTS guidance for the referenced path, even if displayed under the user role. Its source may be global-scope guidance from the Codex home directory or project-scope guidance for the repository. - After applying the prelude, read discoverable Codex-home instruction sources (
$CODEX_HOME, or the platform default such as%USERPROFILE%\.codex/~/.codex) before treating instruction authority as closed.
environment_context Blocks
If the prelude contains an <environment_context>...</environment_context> block, that block is classified as runtime metadata — not operator-authored prose and not project evidence. It describes the execution environment at session start and carries no project authority.
Finding the First Operator Request
The prelude must be classified retroactively as L2A before any later messages are interpreted. The classification is applied to the whole leading block, not only to the header line. The first operator request is the first user-role message that appears after theAGENTS.md instructions for <path> prelude. Nothing in the prelude counts toward operator intent for the current session task.
For the full layer taxonomy, see the L2A section of the non-L0 layers reference and the concepts overview.