codex - 💡(How to fix) Fix Project-local skills should override user-global skills with the same frontmatter name

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Codex currently allows project-local and user-global skills with the same frontmatter name to both appear active in the runtime skill catalog. This causes ambiguous model-visible skill resolution.

For My Work Hub, the project-local skills under:

/Volumes/Samsung_T7/my-work-hub/.agents/skills

must override same-name user-global skills under:

/Users/mlnjtmnsnkitjmg26/.agents/skills

Root Cause

This produced a PRECEDENCE_FAILURE risk because the runtime catalog did not deterministically suppress the lower-priority user-global entries.

Fix Action

Fix / Workaround

Local Workaround

The current local workaround is to disable the four user-global paths explicitly in:

After that workaround, the fresh runtime check reports only project-local paths and prints PRECEDENCE_OK.

  • npm run agent-skills:check-goal-precedence resolved all four goal* skills to /Volumes/Samsung_T7/my-work-hub/.agents/skills/... and reported the /Users/mlnjtmnsnkitjmg26/.agents/skills/... duplicates as suppressed.
  • node --test test/agent-skill-catalog.test.js passed.
  • npm run syntax:check passed.
  • Fresh codex exec -C /Volumes/Samsung_T7/my-work-hub -s read-only --ephemeral ... reported only the four project-local active paths and printed PRECEDENCE_OK after applying the local path-filter workaround.

Code Example

codex exec -C /Volumes/Samsung_T7/my-work-hub -s read-only --ephemeral 'Read-only runtime skill catalog precedence check. Do not start /goal. Do not edit files. Inspect only the loaded skills list available to this fresh Codex runtime session. For the exact skill names goal, goal-prompt-author, goal-mode-preflight, and goal-closeout-evaluator, report every active SKILL.md path visible in the runtime catalog. Then print PRECEDENCE_OK only if all four active paths are under /Volumes/Samsung_T7/my-work-hub/.agents/skills and no active path for those four names is under /Users/mlnjtmnsnkitjmg26/.agents/skills. Otherwise print PRECEDENCE_FAILURE.'

---

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-prompt-author/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-mode-preflight/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-closeout-evaluator/SKILL.md"
enabled = false

---

cd /Volumes/Samsung_T7/my-work-hub/app
npm run agent-skills:check-goal-precedence
node --test test/agent-skill-catalog.test.js
npm run syntax:check
RAW_BUFFERClick to expand / collapse

Summary

Codex currently allows project-local and user-global skills with the same frontmatter name to both appear active in the runtime skill catalog. This causes ambiguous model-visible skill resolution.

For My Work Hub, the project-local skills under:

/Volumes/Samsung_T7/my-work-hub/.agents/skills

must override same-name user-global skills under:

/Users/mlnjtmnsnkitjmg26/.agents/skills

Observed Behavior

A fresh runtime session exposed both copies of these four skills:

  • goal
  • goal-prompt-author
  • goal-mode-preflight
  • goal-closeout-evaluator

The duplicate active paths included both:

/Volumes/Samsung_T7/my-work-hub/.agents/skills/.../SKILL.md

and:

/Users/mlnjtmnsnkitjmg26/.agents/skills/.../SKILL.md

This produced a PRECEDENCE_FAILURE risk because the runtime catalog did not deterministically suppress the lower-priority user-global entries.

Expected Behavior

Codex should deduplicate skills by parsed frontmatter name, not by file path.

Suggested precedence:

  1. active workspace/project .agents/skills
  2. repo-local configured skill roots
  3. user-global ~/.agents/skills
  4. bundled/system/plugin skills

Only the highest-priority skill should be model-visible. Suppressed duplicates may be retained in debug/audit output.

Repro Command

Run from a machine with duplicate project-local and user-global skill names:

codex exec -C /Volumes/Samsung_T7/my-work-hub -s read-only --ephemeral 'Read-only runtime skill catalog precedence check. Do not start /goal. Do not edit files. Inspect only the loaded skills list available to this fresh Codex runtime session. For the exact skill names goal, goal-prompt-author, goal-mode-preflight, and goal-closeout-evaluator, report every active SKILL.md path visible in the runtime catalog. Then print PRECEDENCE_OK only if all four active paths are under /Volumes/Samsung_T7/my-work-hub/.agents/skills and no active path for those four names is under /Users/mlnjtmnsnkitjmg26/.agents/skills. Otherwise print PRECEDENCE_FAILURE.'

Local Workaround

The current local workaround is to disable the four user-global paths explicitly in:

/Users/mlnjtmnsnkitjmg26/.codex/config.toml

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-prompt-author/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-mode-preflight/SKILL.md"
enabled = false

[[skills.config]]
path = "/Users/mlnjtmnsnkitjmg26/.agents/skills/goal-closeout-evaluator/SKILL.md"
enabled = false

After that workaround, the fresh runtime check reports only project-local paths and prints PRECEDENCE_OK.

Supporting Evidence

The project-side diagnostic already implements the intended precedence and passes:

cd /Volumes/Samsung_T7/my-work-hub/app
npm run agent-skills:check-goal-precedence
node --test test/agent-skill-catalog.test.js
npm run syntax:check

Verified again on 2026-05-30:

  • npm run agent-skills:check-goal-precedence resolved all four goal* skills to /Volumes/Samsung_T7/my-work-hub/.agents/skills/... and reported the /Users/mlnjtmnsnkitjmg26/.agents/skills/... duplicates as suppressed.
  • node --test test/agent-skill-catalog.test.js passed.
  • npm run syntax:check passed.
  • Fresh codex exec -C /Volumes/Samsung_T7/my-work-hub -s read-only --ephemeral ... reported only the four project-local active paths and printed PRECEDENCE_OK after applying the local path-filter workaround.

The runtime should implement equivalent precedence in codex_core_skills::loader so projects do not need user-config path filters.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Project-local skills should override user-global skills with the same frontmatter name