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
init/update install Codex skills into the legacy .codex/skills instead of the canonical .agents/skills
Type
Bug (integration targets a directory OpenAI has deprecated for Codex CLI)
Environment
Field
Value
OpenSpec version
1.7.0 (latest on npm)
Install method
[FILL] npm global / pnpm / npx / mise-managed node
Node
[FILL] e.g. 24.19.0
Platform
darwin [FILL] exact macOS version
Codex CLI version
[FILL] output of codex --version
Tools selected at init
Claude Code, Codex
Summary
openspec init (and openspec update) writes the Codex workflow skills to <project>/.codex/skills/openspec-*/SKILL.md. Per OpenAI's current Codex CLI
documentation and an OpenAI maintainer's own statement, .codex/skills is the legacy location; the canonical, documented path is .agents/skills.
The result is that OpenSpec's Codex integration is generated into a directory
that OpenAI documents as unsupported and recommends migrating away from.
Steps to reproduce
Fresh project directory, no .codex/ and no .agents/ present.
The codex target should generate into <project>/.agents/skills/openspec-*/SKILL.md,
with existing OpenSpec-managed .codex/skills/openspec-* directories migrated
(and non-OpenSpec content under .codex/ left untouched).
Evidence
1. OpenSpec source
src/core/config.ts (line 30 on main at time of writing):
All skill paths are built as path.join(projectPath, tool.skillsDir, 'skills')
(src/core/update.ts), so this single field is what produces .codex/skills.
For contrast, the shared target added in #1303 already points at the canonical
directory (line 63):
Verbatim: "Codex reads skills from repository, user, admin, and system locations.
For repositories, Codex scans .agents/skills in every directory from your current
working directory up to the repository root."
.codex/skills is not documented as a discovery location at any scope.
~/.codex/skills is the old (legacy) name. The industry has since standardized
on ~/.agents/skills. We recommend moving to this directory, which is why the
documentation reflects this.
Change the codex entry's skillsDir from .codex to .agents.
Register .codex as a legacy skills dir for that target so OpenSpec-managed openspec-* directories are migrated on init/update, going through the
edited-file-preserving migration framework rather than a bespoke cleanup path.
Leave any non-OpenSpec content under .codex/ alone.
Reconcile with the agents target from feat(init): add shared agents skills target #1303 so selecting both Codex and the
shared .agents target converges on one directory instead of duplicating skills.
Update the supported-tools docs and the post-init summary line accordingly.
Prior art in this repo
PR feat(codex): migrate .codex skills to .agents #1157 — feat(codex): migrate .codex skills to .agents — did exactly
this. Closed unmerged on 2026-08-04 by @clay-good: "Closing this exact branch,
not rejecting the direction of consolidating Codex skills." Reasons given: the
branch was ~115 commits behind/conflicting, predated the skills-only Codex work
in feat(codex): make Codex skills-only and retire managed custom prompts #1283, and its custom cleanup should be rebuilt on the edited-file-preserving
migration framework.
Filing this so the direction #1157 was closed on has a tracking issue that isn't
tied to a stale branch. Happy to open a rebased PR if a maintainer confirms the
intended shape — in particular whether codex should point at .agents directly
or delegate to the agents target. [FILL] keep or drop this offer.
init/updateinstall Codex skills into the legacy.codex/skillsinstead of the canonical.agents/skillsType
Bug (integration targets a directory OpenAI has deprecated for Codex CLI)
Environment
lateston npm)[FILL]npm global / pnpm / npx / mise-managed node[FILL]e.g. 24.19.0[FILL]exact macOS version[FILL]output ofcodex --versionSummary
openspec init(andopenspec update) writes the Codex workflow skills to<project>/.codex/skills/openspec-*/SKILL.md. Per OpenAI's current Codex CLIdocumentation and an OpenAI maintainer's own statement,
.codex/skillsis thelegacy location; the canonical, documented path is
.agents/skills.The result is that OpenSpec's Codex integration is generated into a directory
that OpenAI documents as unsupported and recommends migrating away from.
Steps to reproduce
.codex/and no.agents/present.openspec init.Actual behavior
Nothing is written under
.agents/skills.Expected behavior
The
codextarget should generate into<project>/.agents/skills/openspec-*/SKILL.md,with existing OpenSpec-managed
.codex/skills/openspec-*directories migrated(and non-OpenSpec content under
.codex/left untouched).Evidence
1. OpenSpec source
src/core/config.ts(line 30 onmainat time of writing):All skill paths are built as
path.join(projectPath, tool.skillsDir, 'skills')(
src/core/update.ts), so this single field is what produces.codex/skills.For contrast, the shared target added in #1303 already points at the canonical
directory (line 63):
2. OpenAI's Codex CLI documentation
https://learn.chatgpt.com/docs/build-skills (the current target of the 308 redirect
from
https://developers.openai.com/codex/skills/) lists the discovery locations as:$CWD/.agents/skills$CWD/../.agents/skills$REPO_ROOT/.agents/skills$HOME/.agents/skills/etc/codex/skills(admin)Verbatim: "Codex reads skills from repository, user, admin, and system locations.
For repositories, Codex scans
.agents/skillsin every directory from your currentworking directory up to the repository root."
.codex/skillsis not documented as a discovery location at any scope.3. OpenAI maintainer statement
openai/codex#14337, comment by
@etraut-openai(2026-03-11):Link: openai/codex#14337 (comment)
Scope note — what is and isn't verified
Being precise so the severity isn't overstated:
.agents/skillsis the only documented Codex skills path, and anOpenAI maintainer calls
.codex/skillslegacy and recommends migrating off it.mainstill write thecodextarget to.codex/skills.that Codex CLI does still pick up skills from
~/.codex/skills(user scope).So this is a deprecated-path bug, not necessarily a hard "skills never load" bug.
Proposed fix
codexentry'sskillsDirfrom.codexto.agents..codexas a legacy skills dir for that target so OpenSpec-managedopenspec-*directories are migrated oninit/update, going through theedited-file-preserving migration framework rather than a bespoke cleanup path.
.codex/alone.agentstarget from feat(init): add shared agents skills target #1303 so selecting both Codex and theshared
.agentstarget converges on one directory instead of duplicating skills.Prior art in this repo
.codexskills to.agents— did exactlythis. Closed unmerged on 2026-08-04 by
@clay-good: "Closing this exact branch,not rejecting the direction of consolidating Codex skills." Reasons given: the
branch was ~115 commits behind/conflicting, predated the skills-only Codex work
in feat(codex): make Codex skills-only and retire managed custom prompts #1283, and its custom cleanup should be rebuilt on the edited-file-preserving
migration framework.
agentstarget writing to.agents/skills(merged 2026-07-29, after the 1.7.0 release, so not yetavailable in the published CLI).
.agent/skillsfolder for all agents that support it #689 — earlier proposal for a standard shared skills folder (closed).Filing this so the direction #1157 was closed on has a tracking issue that isn't
tied to a stale branch. Happy to open a rebased PR if a maintainer confirms the
intended shape — in particular whether
codexshould point at.agentsdirectlyor delegate to the
agentstarget.[FILL]keep or drop this offer.