Chapter C68 · Interactive Course
Guide Codex and inspect its reach
AGENTS.md discovery, overrides, skills, connected servers, the three permission dials and surviving compaction.
Core Learning Concept
Inspect the task’s guidance, skills, connected capabilities, and execution permissions as separate layers. Determine which instructions apply to this location and whether required information is actually included. Use the supplied setup evidence to explain unexpected behavior before changing configuration or broadening access.
What You’ll Learn in This Chapter
-
AGENTS.md supplies applicable guidance
Identify project conventions Codex discovers.
Codex discovers applicable AGENTS.md files along the project directory tree. These instructions establish project commands and conventions. Keep them concise and verifiable, since guidance depends on folder scope rather than repository existence.
-
Overrides can explain surprising guidance
Inspect a supplied instruction-discovery chain.
AGENTS.override.md and fallback filenames alter which guidance Codex loads. Within a directory, overrides replace parent rules rather than merging text. Check discovery paths against official rules when instructions produce unexpected agent behaviors.
-
Skills reuse a task procedure
Choose an applicable skill and inspect its result.
Skills package task-specific instructions and resources. Codex can use a skill when explicitly selected or when the request matches its description under the host’s rules. Discovery metadata and full instructions are loaded at different stages. Check that the skill fits the task and inspect its resulting work.
-
MCP adds connected capabilities
Inspect a configured server and its available tools.
An MCP connection can make external tools or context available to Codex through a configured server. It does not automatically authorize every operation or prove the server was used. Verify the capability, access, call result, and destination state appropriate to the task. Connected material still needs interpretation and checking.
-
Permissions constrain the task
Distinguish file access, network access and approval behavior.
Permissions and sandboxes restrict filesystem, network, and execution operations under configured policies. Text prompts cannot enforce security boundaries. Inspect effective permission modes directly rather than assuming instructions alone prevent unwanted actions.
-
Context is selected and can be compacted
Keep a concise task record across a longer run.
Codex works from selected context including instructions, files, and tool outputs. Long sessions compact earlier dialogue to fit limits. Important details require rechecking against source files rather than relying entirely on compacted memories.
-
Inspect the Codex task setup
Read a supplied guidance chain, skill selection and server status, and say which files and services the task can actually use.