Skip to main content

Usage of "allow_implicit_invocation: false" Exaplained

Calculating read time…

Yes — Codex loads every installed skill's name and description into context at startup, and that costs real tokens; allow_implicit_invocation: false is the setting that removes a specific skill from that startup list entirely, so it stops costing tokens and stops auto-triggering, while still staying reachable if you type its name directly. 🎯

This is worth getting precise about, because the intuitive guess is usually wrong on one detail: people assume this flag just "stops the skill from firing automatically," and stop there. What actually happens is stronger — the skill's description is pulled out of the model-visible list altogether, not merely muted. That distinction matters the moment you have a sensitive or expensive skill (one that touches production data, spends a lot of tokens, or should only run when a human explicitly asks for it) sitting alongside dozens of others. 🔐

Diagram comparing allow_implicit_invocation true versus false and their effect on token cost and triggering

The same skill, two different footprints, depending on one policy field.

1. Do Skills Really Consume Tokens Just From Being Installed?

Yes, and OpenAI's own documentation is direct about it: Codex starts every session with each installed skill's name, description, and file path already in context, so it can decide which skill fits an incoming task. That startup list is capped — at most 2% of the model's context window, or 8,000 characters if the window size isn't known — specifically so a large skill library can't crowd out the rest of the prompt. If you've installed enough skills to hit that ceiling, Codex starts shortening descriptions first, and for very large sets it may drop some skills from the list entirely and show a warning.

✅ Worked example: this is exactly the same Level 1 / Level 2 / Level 3 loading model covered in our SKILL.md article — the startup list is Level 1 (name + description, always loaded), and the full SKILL.md body only enters context in Level 2, once Codex actually selects that skill for the task.

🎯 Use this fact when a large skill library feels like it's eating into response quality — the fix is usually trimming descriptions or disabling rarely-used skills, not removing the format itself.

2. What allow_implicit_invocation: false Actually Does

This field isn't part of SKILL.md's own YAML frontmatter — it lives in a separate, optional file placed next to it: agents/openai.yaml, under a policy block.

Real example — straight from OpenAI's Codex skills reference

policy:
  allow_implicit_invocation: false

The default is true for every skill — meaning Codex is always allowed to auto-invoke it when a prompt matches the description closely enough. Setting it to false switches that off: Codex will no longer choose the skill on its own, no matter how well a prompt matches. The skill still works — but only when a person explicitly names it in the prompt with $skill-name, or invokes it through /skills.

💡 The detail beginners miss: real-world skill sets built on top of this field (documented in community repositories that ship both a Claude Code and a Codex version of every skill) report that Codex actually filters the skill's description out of the model-visible skills list once this flag is set — not just out of the triggering logic. That means the token savings are real and immediate, not just a behavioral restriction layered on top of a description Codex still has to read every time.

🎯 Use this when a skill is either expensive to run, touches something sensitive, or is purely a personal shortcut you'll remember to type yourself — none of those need to compete for auto-trigger attention.

3. Explicit vs. Implicit Invocation, Side by Side

Setting In model-visible skills list? Auto-triggers on a matching prompt? Works via $skill-name?
allow_implicit_invocation: true (default) Yes Yes Yes
allow_implicit_invocation: false No No Yes

🎯 Use this table as the quick mental check before you write the field — the only thing you're trading away is auto-triggering and list visibility; explicit access never goes away.

❓ FAQ

Does allow_implicit_invocation: false belong in SKILL.md?

No. It belongs in the separate agents/openai.yaml file inside the skill's folder, under a policy block — SKILL.md's own frontmatter only holds fields like name and description.

Does this disable the skill entirely?

No — it disables automatic selection only. A user can still run it explicitly with $skill-name in the prompt, or through /skills. To fully disable a skill instead, use an [[skills.config]] entry with enabled = false in ~/.codex/config.toml.

Is this the same as Claude Code's equivalent setting?

The concept matches Claude Code's disable-model-invocation: true frontmatter field, but the location and syntax differ by platform — Claude Code sets it directly in SKILL.md's frontmatter, while Codex sets it in the companion agents/openai.yaml file. If you ship the same skill to both, you need to set both fields.

🔗 References

All product names and trademarks (including Codex and OpenAI) are the property of their respective owners and are referenced for identification purposes only. Explanations above are original synthesis fact-checked against the sources listed.

Bottom line: skills are cheap by default because of progressive disclosure, but "cheap" isn't "free" — every installed skill's description still sits in the startup budget until you explicitly opt it out with allow_implicit_invocation: false. Reach for that flag on anything sensitive, expensive, or meant to be a deliberate, typed action rather than a background reflex. 🧭

Comments