Codex Does Not Support disable-model-invocation in Skill Frontmatter

Codex logo

I first ran into this a day earlier, when Codex greeted me on startup with Warning: Exceeded skills context budget. That sent me down a rabbit hole: why were my skills being loaded into context when most already had disable-model-invocation: true in their frontmatter?

Really annoyed to just find out that Codex doesn’t support the disable-model-invocation field in skills. Instead, it wants a Codex-specific file in the skill to do the same thing.

With Claude Code and Pi, adding disable-model-invocation: true to the SKILL.md frontmatter is all it takes to make a skill manual-only. More importantly, it keeps that skill out of the model’s default context until I invoke it.

But for some reason, Codex decided to go a different way. It needs an agents/openai.yaml file containing:

policy:
  allow_implicit_invocation: false

Whether implicit invocation is enabled or not, Codex skills can still be invoked explicitly using the $skill-name syntax.

Avoiding skill context pollution may not be as useful as declaring MCP dependencies, but I still like being able to control it.

Shout-out to Matt Pocock, who added Codex model invocation control to all his relevant skills. I use a fair number of his skills, and this helps.

I was curious as to what else could be added to that file. The docs say we can set configuration such as the display name, short description, icons, etc.

What I found interesting was that we can also declare an MCP server dependency for the skill! That might ease some of the pain of maintaining a separate file for Codex.

As an aside, OpenCode might be worse than Codex in this regard. It supports neither disable-model-invocation in the frontmatter nor an equivalent agents/opencode.yaml file. Instead, skill visibility is controlled by configuration in opencode.json. This is terrible for skill authors who really want to keep their skills portable across agents.

But again, product-specific features are not especially valuable to me unless other agents support an equivalent. I work with multiple agents and want to keep my skills portable across them.

tech
My Preferred Way to Use AI Inside Obsidian Codex's Built-In Web Search Can Return Stale Results