You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skills with implicit invocation disabled while only allowing explicit invocation #10585
Currently, there is no way to disable implicit invocation of skills while allowing explicit invocation via $<name>; we can only instruct codex in natural languages not to invoke skills implicitly, which may or may not be respected by codex.
Given that custom prompts, which is similar to skills but can only be invoked explicitly (via /prompts:<name>), is deprecated in favor of skills, there should be a way to define skills with implicit invocations disabled; otherwise skills cannot be a complete alternative to custom prompts.
Additional information
No response
Reacted by v-byte-cpu, Ryugo YOSHIOKA, Nikolay Andreychuk, enprop, Shubham Dhama, Joel, iskng, Mark Wotton, Ignat Remizov, Junqing Chen and 6 more
Similar but not the same. I believe my issue is valid because:
My issue wants to solve and concentrates on the situation where custom prompts has been deprecated recently in favor of skills. Non-discoverable (manual) skills #8713 is a feature request unrelated to this deprecation.
Non-discoverable (manual) skills #8713 proposes a new syntax for skill metadata and thus was redirected to an issue of Agent Skills spec repo. My issue doesn't specify how the feature should be implemented. For example, it may be implemented as a config key in ~/.codex/config.toml, which can evolve independent of the standard.
Out of curiosity, are you seeing situations where a skill is invoked implicitly when you don't want it to be? Or is this more of a theoretical concern?
If you're seeing cases where it's being invoked implicitly when that's not desired, we'd be interested in hearing about that.
I have many custom prompts which perform destructive operations such as deleting AWS resources, so I want to be 100% (not 99%) sure they are invoked only when I explicitly request so.
A workaround I come up with (but haven't tried) is to bind-mount the skills directories only when I want to use them. This would work only when, for example, codex CLI is running inside a Docker container. (Actually I do wrap codex inside a docker container and implement many safeguards (e.g. bind-mounting an empty file onto an existing .env for extra safety).)
Some tools use disable-model-invocation: true in the frontmatter for this -- then the skill will not be auto-invoked, only if you specifically ask for it. I thought it was in the agent skills spec but apparently not.
Cursor defines it like this:
By default, skills are automatically applied when the agent determines they are relevant. Set disable-model-invocation: true to make a skill behave like a traditional slash command, where it is only included in context when you explicitly type /skill-name in chat.
Reacted by ynn, Nikolay Andreychuk, enprop, Shubham Dhama, Seonu Jang, Vlad Tansky, Thierry Santos, Joel, Ignat Remizov, yoong and 4 more
One potential use-case for this functionality are skills that the agent might not be able to invoke in all environments the repository is being modified in.
For instance, an infrastructure type repo could have a skill for planning/previewing the changes (ie Terraform Plan), but it requires SRE type credentials to be discoverable in the environment. This is not a skill you would want the model to automatically try to invoke if it's running somewhere like Codex Cloud, but it is a skill you would want to manually invoke from Codex CLI running on your laptop.
I'd love it if Codex just supported the disable-model-invocation Frontmatter flag, as it's somewhat conventional and would work across other harnesses (from what I've found, this flag is currently supported on Claude Code, Gemini CLI, Cursor and Pi).
Forcing a custom openai.yaml file convention and making it Codex-specific is as-annoying as Anthropic not adopting the AGENTS.md file convention on Claude Code and forcing everyone to symlink CLAUDE.md.
Reacted by Cameron Fletcher, Ludovic Fabrèges, joshua-redmond-1st, λ🏺, Bing Wen, tomergalatwix, Ignat Remizov, Evan Albert, Michael Ramos, Dan Goje and 12 more
Reacted by Ignat Remizov, arunsampathkumar-grabtaxi, jaya-wijono-easygo, Filip Prochazka, xspyhack, Abid A Gafoor, Meryll Essig, jacob, georgefdm, Giuseppe Rosa and 2 more
Could Codex also support disable-model-invocation: true in SKILL.md frontmatter as a compatibility alias for policy.allow_implicit_invocation: false?
Pi already supports this frontmatter field. When sharing the same skills between Pi and Codex, authors currently need an additional agents/openai.yaml file just to express the same invocation policy. Keeping the setting alongside name and description would make these skills easier to maintain and reuse across agents.
For example:
---
name: my-skilldescription: A workflow intended for explicit user invocation.disable-model-invocation: true
---
The existing agents/openai.yaml configuration could remain supported. If both settings are present, Codex could give an explicitly configured policy.allow_implicit_invocation precedence and document that behavior. Explicit $my-skill invocation should remain available.
I understand this issue was closed because explicit-only invocation is already supported; this request is specifically about accepting the existing frontmatter convention for interoperability, rather than adding a new invocation capability.
Activity
github-actions commentedon Feb 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
your-diary commentedon Feb 4, 2026
No, it's not.
This is a question issue asked by me in the past.
Similar but not the same. I believe my issue is valid because:
My issue wants to solve and concentrates on the situation where custom prompts has been deprecated recently in favor of skills. Non-discoverable (manual) skills #8713 is a feature request unrelated to this deprecation.
Non-discoverable (manual) skills #8713 proposes a new syntax for skill metadata and thus was redirected to an issue of Agent Skills spec repo. My issue doesn't specify how the feature should be implemented. For example, it may be implemented as a config key in
~/.codex/config.toml, which can evolve independent of the standard.etraut-openai commentedon Feb 4, 2026
Out of curiosity, are you seeing situations where a skill is invoked implicitly when you don't want it to be? Or is this more of a theoretical concern?
If you're seeing cases where it's being invoked implicitly when that's not desired, we'd be interested in hearing about that.
your-diary commentedon Feb 4, 2026
@etraut-openai
It's a theoretical concern.
I have many custom prompts which perform destructive operations such as deleting AWS resources, so I want to be 100% (not 99%) sure they are invoked only when I explicitly request so.
A workaround I come up with (but haven't tried) is to bind-mount the skills directories only when I want to use them. This would work only when, for example,
codexCLI is running inside a Docker container. (Actually I do wrapcodexinside a docker container and implement many safeguards (e.g. bind-mounting an empty file onto an existing.envfor extra safety).)EricGT commentedon Feb 4, 2026
For what it's worth, similar skill invocation/activation concerns are also noted at
https://github.com/agentskills/agentskills/issues
wsmoak commentedon Feb 14, 2026
Some tools use
disable-model-invocation: truein the frontmatter for this -- then the skill will not be auto-invoked, only if you specifically ask for it. I thought it was in the agent skills spec but apparently not.Cursor defines it like this:
lattwood commentedon Mar 23, 2026
One potential use-case for this functionality are skills that the agent might not be able to invoke in all environments the repository is being modified in.
For instance, an infrastructure type repo could have a skill for planning/previewing the changes (ie Terraform Plan), but it requires SRE type credentials to be discoverable in the environment. This is not a skill you would want the model to automatically try to invoke if it's running somewhere like Codex Cloud, but it is a skill you would want to manually invoke from Codex CLI running on your laptop.
etraut-openai commentedon Mar 30, 2026
This feature is already supported. See this documentation for details.
ignatremizov commentedon Apr 3, 2026
For anyone landing here from search: this is configured in the skill metadata file
agents/openai.yaml, not inSKILL.md.Example:
Typical layout:
With that setting, the skill is not injected implicitly, but it can still be invoked explicitly via
$skill-name.MichaelYochpaz commentedon May 15, 2026
I'd love it if Codex just supported the
disable-model-invocationFrontmatter flag, as it's somewhat conventional and would work across other harnesses (from what I've found, this flag is currently supported on Claude Code, Gemini CLI, Cursor and Pi).Forcing a custom
openai.yamlfile convention and making it Codex-specific is as-annoying as Anthropic not adopting theAGENTS.mdfile convention on Claude Code and forcing everyone to symlinkCLAUDE.md.fix(speckit-pro): improve Codex Layer 2 trigger accuracy for 3 skills
feat(speckit-pro)!: align with spec-kit v0.8.13 skills format (#51)
backnotprop commentedon Jun 13, 2026
codex needs to support
disable-model-invocationand also bash
StudentWeis commentedon Oct 17, 2026
Could Codex also support
disable-model-invocation: trueinSKILL.mdfrontmatter as a compatibility alias forpolicy.allow_implicit_invocation: false?Pi already supports this frontmatter field. When sharing the same skills between Pi and Codex, authors currently need an additional
agents/openai.yamlfile just to express the same invocation policy. Keeping the setting alongsidenameanddescriptionwould make these skills easier to maintain and reuse across agents.For example:
The existing
agents/openai.yamlconfiguration could remain supported. If both settings are present, Codex could give an explicitly configuredpolicy.allow_implicit_invocationprecedence and document that behavior. Explicit$my-skillinvocation should remain available.I understand this issue was closed because explicit-only invocation is already supported; this request is specifically about accepting the existing frontmatter convention for interoperability, rather than adding a new invocation capability.
Pi documentation: https://pi.dev/docs/latest/skills#understand-how-skills-load