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:
- active workspace/project
.agents/skills
- repo-local configured skill roots
- user-global
~/.agents/skills
- 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.
Summary
Codex currently allows project-local and user-global skills with the same frontmatter
nameto 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/skillsmust override same-name user-global skills under:
/Users/mlnjtmnsnkitjmg26/.agents/skillsObserved Behavior
A fresh runtime session exposed both copies of these four skills:
goalgoal-prompt-authorgoal-mode-preflightgoal-closeout-evaluatorThe duplicate active paths included both:
/Volumes/Samsung_T7/my-work-hub/.agents/skills/.../SKILL.mdand:
/Users/mlnjtmnsnkitjmg26/.agents/skills/.../SKILL.mdThis produced a
PRECEDENCE_FAILURErisk 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:
.agents/skills~/.agents/skillsOnly 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:
Local Workaround
The current local workaround is to disable the four user-global paths explicitly in:
/Users/mlnjtmnsnkitjmg26/.codex/config.tomlAfter 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:checkVerified again on 2026-05-30:
npm run agent-skills:check-goal-precedenceresolved all fourgoal*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.jspassed.npm run syntax:checkpassed.codex exec -C /Volumes/Samsung_T7/my-work-hub -s read-only --ephemeral ...reported only the four project-local active paths and printedPRECEDENCE_OKafter applying the local path-filter workaround.The runtime should implement equivalent precedence in
codex_core_skills::loaderso projects do not need user-config path filters.