openai / openai/codex

allow_implicit_invocation: false also disables explicit $skill invocation, contradicting docs

Open
#40,600 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI skills
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Docs (https://developers.openai.com/codex/skills → learn.chatgpt.com/docs/build-skills) state that with agents/openai.yaml:

policy:
  allow_implicit_invocation: false

"the skill is not injected into the model context by default, but can still be invoked explicitly via $skill."

Measured on codex-cli 0.149.0 (macOS), the second half doesn't hold: $skill mentions of a policy-restricted skill are not expanded.

Repro:

  1. Create ~/.codex/skills/test-policy/SKILL.md (name/description frontmatter, body marker POLICY-BODY) and agents/openai.yaml with the policy above.
  2. Create ~/.codex/skills/test-plain/SKILL.md identically, no openai.yaml.
  3. Run codex debug prompt-input '$test-plain go' → skill body is injected.
  4. Run codex debug prompt-input '$test-policy go' → prompt contains only the literal text; no expansion, and the skill is absent from <skills_instructions>.

Same behavior through codex app-server threads. So a skill with the policy has no invocation path at all in non-TUI surfaces.

Expected: either $skill works for policy-restricted skills (docs behavior), or the docs state that allow_implicit_invocation: false disables explicit invocation outside the TUI picker.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the codex debug prompt-input entry point and compare it with codex app-server thread handling using the provided test-policy and test-plain skill setup. Trace how $skill mentions and allow_implicit_invocation: false are handled; done means either explicit invocation expands the restricted skill or the behavior and documentation are aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.