Skip to content
GUIDES#Codex#OpenAI Codex#Codex skills

Why Codex Ignores Your Skill Instructions (And How to Make Them Stick)

You wrote a clean skill, saved it on your machine, and the agent still does whatever it wants. The problem is almost never the instructions themselves. It is in how Codex decides whether to read them at all.

Yaakov Tzedek
Yaakov Tzedek · AI expert·8 min read
THE BOTTOM LINE
  • Codex ignoring your skills? Wrong folder, weak description, or a rule that never loaded. Here is how to fix it: explicit activation, AGENTS.md, and result verification.

Codex does not read your skill upfront. At the start of a task it sees only the name and description of each skill, and loads the full instructions only when it decides the task matches them. So when a skill sits in a folder Codex does not scan, when its description is vague, or when it contains a hard rule that should have lived in AGENTS.md, the agent "goes off-script." What actually strengthens compliance: putting the skill in the right path, writing a description that says exactly when to invoke it, invoking it explicitly with $ on critical tasks, and moving non-negotiable rules to AGENTS.md.

A question that keeps coming up in different forms was recently posted in a Facebook AI group: the Codex agent occasionally ignores the skill instructions, even though the skill is saved in a local folder the agent has access to. Every detail is accurate, yet the underlying assumption is wrong. The fact that the agent can access the folder does not mean it knows a skill is in there.

How Codex decides whether to use a skill

According to the official OpenAI documentation on building skills (checked 2026-10-15), a skill is a folder containing a SKILL.md file. The file must open with two fields: name and description. Skills can be loaded in two ways:

  • Explicit invocation: In Codex CLI or the IDE extension, type $ or run /skills and select the skill.
  • Implicit invocation: Codex selects the skill on its own when the task matches its description.

The point most users miss is that loading is staged. At the start of a task Codex receives a list of names, descriptions, and file paths, and only reads the full SKILL.md once it decides to use a skill. If it never makes that decision, your instructions simply are not in front of it.

There is also a space constraint. According to the same documentation page (checked 2026-10-15), the initial list takes up at most 2% of the context window, or 8,000 characters when the window size is unknown. With many skills present, Codex first truncates descriptions and may drop skills from the list entirely. The skills.max_context_tokens setting raises the budget to 10,000 tokens.

In one sentence: With implicit invocation, the skill competes for the agent's attention through its description alone.

Five reasons the agent "ignores" a skill

1. The skill is not in a path Codex scans

Codex loads local skills only from these locations (per the documentation, checked 2026-10-15):

LevelPath
Project.agents/skills, scanned from the current directory up to the repo root
User$HOME/.agents/skills
System admin/etc/codex/skills
SystemSkills bundled with Codex

A SKILL.md file sitting somewhere like "My Documents/skills" is just a regular document as far as Codex is concerned. It can read it if you ask, but it will not appear in the skills list and will never trigger on its own. Codex does follow symlinks, so you can leave the skill where it is and link to it from the correct path.

2. The description does not match how you phrase your requests

A description like "helps with writing code" fits every task, so it never decides anything. The documentation recommends a concise description with clear boundaries, and trigger words at the start, so the match still works even if the description gets truncated.

3. Too many skills

Twenty skills with long descriptions will exceed the budget. Descriptions get truncated, and the exact sentence that said when to invoke the skill may get cut off.

4. Conflicting instructions

According to the AGENTS.md documentation (checked 2026-10-15), Codex chains instruction files from the project root down to the current directory, with files closer to the current directory overriding earlier ones. If AGENTS.md says one thing and the skill says another, you have created the "deviation" yourself. The same applies when a conversational request contradicts the skill: in practice you have no control over which of the two instructions wins.

5. You edited mid-session

The AGENTS.md instruction chain is built once at the start of each run, and in the terminal interface that is typically once per session. Any edit made after launch will not take effect until you restart Codex.

How to strengthen your instructions: seven steps

  1. Move the skill to the right path. For a project skill: .agents/skills/<skill-name>/SKILL.md inside the repo. For a personal skill that works across all projects: $HOME/.agents/skills. Then type $ and confirm the skill appears in the list.

  2. Rewrite the description: when yes and when no. The template the documentation presents is "Explain exactly when this skill should and should not trigger." In practice it looks like this:

    ---
    name: release-notes
    description: Invoke on any request to write or update release notes, a changelog, or a summary of changes before a release. Do not invoke for API documentation or README files.
    ---
    

    Write the trigger words in the language you actually use when talking to the agent. If you write to the agent in Hebrew, a description written entirely in English makes it harder for it to match the request.

  3. On critical tasks, invoke explicitly. $release-notes at the start of a request eliminates the gamble. The agent does not need to decide whether the skill is relevant, because you told it.

  4. Move hard rules to AGENTS.md. AGENTS.md is read on every run. The skill is read only when selected. A rule that must never be broken cannot depend on a selection:

    # Standing rules
    - Never push directly to main. Every change goes in a separate branch.
    - Before completing a task: run npm test and report the result.
    - On any request for release notes: use the $release-notes skill.
    

    That last line is the most important one: AGENTS.md can reference a skill, which gives implicit invocation a safety net. The global file lives at ~/.codex/AGENTS.md, and each directory in the project can have its own file. One constraint to keep in mind: Codex stops adding files once the combined content reaches 32 KiB (the default for project_doc_max_bytes, per the documentation, checked 2026-10-15).

  5. Reduce the number of skills competing with each other. A skill you only ever invoke manually does not need to compete for space. In the agents/openai.yaml file inside the skill folder, set allow_implicit_invocation: false under policy. Explicit invocation with $ continues to work normally. A skill you are not using at all can be disabled in ~/.codex/config.toml with a [[skills.config]] entry and enabled = false, then restart Codex.

  6. Move checks into scripts. A skill can have a scripts/ folder. An instruction like "verify that every file starts with a license header" is a request to the agent. A script that checks for it and fails if it is missing is a fact. Anything that can be verified in code should be verified in code, not remembered by the model.

  7. End every skill with a verification step. At the bottom of SKILL.md, write what the agent must report: which steps it performed, which commands it ran, and what came back. An agent that has to report on each step skips fewer of them, and if it does skip one, you will see it in the report.

Where to put each instruction

MechanismWhen it loadsBest for
Skill with implicit invocationName and description at the start, full file only if Codex selected itRecurring workflows the agent recognizes on its own
Skill with explicit invocation ($)When you call itTasks where missing an instruction is not acceptable
AGENTS.mdAt the start of every run, alwaysStanding rules that must never be broken
Script in scripts/ folderWhen the skill runs itChecks that do not depend on the model's memory

The simple rule: the more important the instruction, the less it should depend on the agent's judgment. This is the same principle behind the draft rule for safe work with AI agents: what must not go wrong should not be left to a model's decision.

How to verify it is actually working

The OpenAI documentation suggests three checks, and it is worth running all of them after every change:

  1. Ask the agent to summarize its instructions. Launch Codex from the project root and ask what instructions it received. It should list the global instructions and the project instructions in priority order. If your rule does not appear, it was not loaded.
  2. Check the log. Running with codex -c log_dir=... produces a text log where you can see which files were actually loaded. To check a subdirectory, use --cd.
  3. Test the description against real requests. The documentation recommends running sample requests and verifying that the right skill is invoked. Write five requests phrased the way you actually phrase them, and check how many triggered the skill without $.

If your instructions look stale, there is no cache to clear: restart Codex, because the chain is rebuilt on every run.

What this means if you work with multiple agents

Skills are built on an open standard for agent skills, so the logic here closely mirrors what happens in Claude. Anyone who has already built Claude Skills will recognize exactly the same problem: a weak description is a skill that does not load. And anyone running Claude Code and Codex on the same project, as in the guide to running them in parallel with Git Worktrees, needs to make sure the standing rules are phrased the same way for both agents, so they are not working from two different rulebooks.

The bottom line

Back to the question from the group. The agent is not "ignoring" your instructions. In most cases it simply never read them, because it did not know they existed or did not think they were relevant to the task. A skill is a proposal the agent is free to accept, AGENTS.md is a rule it reads on every run, and a script is a check that depends on neither.

Three things to do today: move the skill to .agents/skills, rewrite the description with "when yes and when no," and move your three most important rules to AGENTS.md.

If you want to work through this systematically, including how to phrase tasks for the agent and how to review what comes back, the OpenAI Codex 2026 course: assigning tasks to the agent and reviewing the results covers it for 9.90 ILS. For a broader introduction to the environment, there is also the ChatGPT Work and Codex guide in Hebrew.

Sources

Frequently asked questions

Was this article helpful?
Share:WhatsAppLinkedInX
Yaakov Tzedek
WRITTEN BY

Yaakov Tzedek

An Israeli AI lecturer, consultant and implementer who has supported 100+ organizations in AI implementation and lectured for 200+. Official content partner of Meta, Google, Canva and TikTok, featured on Israel's Channel 13.

More about Yaakov →