From ae8526cd50ac4a9f0f21e5f3221d96f167eaf3bd Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Thu, 23 Jul 2026 07:38:42 -0400 Subject: [PATCH] fix(#2429): scope Codex skills home override to --global only (#2553) * fix(#2429): scope Codex skills home override to --global only The skills-kind home override (redirecting skills to $HOME/.agents) was applied regardless of scope. Gate it behind scope === 'global' so --local installs keep skills project-local under the config directory. Closes #2429 * docs(#2429): backfill changeset PR number (2553) --- .changeset/2429-codex-local-install-scope.md | 5 +++++ src/runtime-artifact-layout.cts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/2429-codex-local-install-scope.md diff --git a/.changeset/2429-codex-local-install-scope.md b/.changeset/2429-codex-local-install-scope.md new file mode 100644 index 000000000..12b1de5fc --- /dev/null +++ b/.changeset/2429-codex-local-install-scope.md @@ -0,0 +1,5 @@ +--- +type: Fixed +pr: 2553 +--- +**Codex `--local` installation no longer writes skills to `$HOME/.agents/skills`** — the skills-kind `home` override (which redirects skills to the user-global `.agents` directory) is now only applied for `--global` scope. When `--local` is specified, skills are installed under the project-local config directory, matching the scope the user selected. Previously, a `--local` Codex install created a split installation: project-local config but user-global skills. (#2429) diff --git a/src/runtime-artifact-layout.cts b/src/runtime-artifact-layout.cts index 4a5f8bd8d..255c728ac 100644 --- a/src/runtime-artifact-layout.cts +++ b/src/runtime-artifact-layout.cts @@ -521,7 +521,7 @@ function dispatchKindEntry(entry: ArtifactKindDescriptor, runtime: string, confi ); } - if (typeof entry.home === 'string' && entry.home !== '') { + if (scope === 'global' && typeof entry.home === 'string' && entry.home !== '') { result.home = path.join(os.homedir(), entry.home); }