Codex Desktop background exec intermittently deletes ~/.codex/skills/.system
What happened?
On Codex Desktop, the Codex-managed system skills directory under ~/.codex/skills/.system repeatedly disappears and later reappears. When it is absent, new turns do not get the bundled system skills in the available-skills list.
The missing skills are:
imagegenopenai-docsplugin-creatorskill-creatorskill-installer
Observed timeline
Local timezone: EDT, April 23, 2026.
22:53:09:~/.codex/skills/.systemwas present with all five expectedSKILL.mdfiles and.codex-system-skills.marker.22:56:24:codex_chroniclelaunched a childcodex execprocess with--ephemeral,--ignore-user-config,--ignore-rules, and--config skills.bundled.enabled=false.22:56:25:~/.codex/skillsmtime/ctime changed.23:01:51:~/.codex/skills/.systemwas missing. A search only foundplugin-creatorin a temp plugin area andopenai-docsundervendor_imports; none of the expected system skills existed under~/.codex/skills/.system.23:02:57:~/.codex/skillschanged again, and the.systemdirectory was later present again.
This also happened earlier in the same session: a check saw the full .system directory with all system skills, and a follow-up check about 15 seconds later found the directory gone.
Why this looks like a Codex bug
The Codex binary appears to contain a built-in system-skills sync path. Running strings against the desktop app's codex binary shows strings including:
remove existing system skills dircreate system skills dirwrite system skill file.codex-system-skills.marker
That suggests Codex owns this directory and likely removes/recreates it during system-skill sync. The observed failure mode looks like a delete-before-rewrite race or a background/ephemeral process running the cleanup path while skills.bundled.enabled=false, so it removes the global system skills but does not rewrite them.
Expected behavior
- Background or ephemeral
codex execjobs, especially ones launched withskills.bundled.enabled=false, should not mutate the global~/.codex/skills/.systemdirectory. - System skill refresh should be atomic, e.g. write to a temporary directory and rename into place, so there is never a window where the directory is missing.
- Disabling bundled skills for one process should not delete the user's shared system skills installation.
Actual behavior
~/.codex/skills/.system flickers between present and absent. When absent, system skills are not available in new turns/sessions.
Environment
- Codex Desktop:
26.422.21459/ build2049 codex-cli:0.124.0-alpha.2- macOS:
26.0.1(25A362) - Chronicle/memories enabled in the desktop app
Suggested fix
The safest fix is likely:
- Do not run global system-skill installation/removal from ephemeral/background
codex execprocesses. - Never remove
~/.codex/skills/.systemwhenskills.bundled.enabled=false. - Make the system-skill sync atomic: write
~/.codex/skills/.system.tmp-*, validate contents and marker, then rename into place.
Additional confirmation from Codex Desktop on macOS.
Environment:
- Codex Desktop: 26.422.62136 / build 2180
- codex-cli: 0.125.0
- macOS: 26.4.1 (25E253), arm64
Observed today: the same five documented system skills were not available in the local Codex session:
- imagegen
- openai-docs
- plugin-creator
- skill-creator
- skill-installer
A local docs check showed that the official Codex docs describe $skill-creator and $plugin-creator as built-in/system skills. Local Git evidence also showed that the vendored openai/skills checkout contains all five under skills/.system in the Git tree:
git -C ~/.codex/vendor_imports/skills ls-tree --name-only HEAD:skills/.system
# imagegen
# openai-docs
# plugin-creator
# skill-creator
# skill-installer
But the materialized sparse checkout only included:
skills/.curated
skills/.experimental
So skills/.system existed in the Git object tree but was absent from the filesystem. The active local skill directory also lacked these five system skills, and the local bundled/runtime marketplace JSON files did not list them as plugins.
Manual remediation worked: copying the five skills/.system/* directories from the vendored Git tree into a scanned local skill path made them structurally valid. Validation passed with:
npx --yes skills-ref validate
skill-creator-modern/scripts/quick_validate.py
One related nuance: absence from a generated visible skill inventory is not sufficient proof that a skill cannot load, because explicit linked-skill invocation can still work. In this case, however, the stronger evidence is filesystem-level: the five system skill folders were not materialized under scanned skill paths until copied manually.
This seems consistent with this issue's root concern: Codex-managed system skills can be missing from local sessions even though the current docs and the vendored openai/skills tree expect them to exist.
Additional confirmation from another macOS Codex Desktop install, with a smaller isolated repro.
Environment:
- Codex Desktop:
26.429.20946/ build2312 - Desktop bundled CLI:
codex-cli 0.128.0-alpha.1 - Global CLI/npm:
codex-cli 0.128.0/@openai/[email protected] - macOS:
26.4.1(25E253)
User-visible symptom:
$imagegen,$skill-creator, and$skill-installerappear briefly in the Codex app skill/capability surface, then disappear after the app finishes initializing.~/.codex/skills/.systemflips between present and missing.- When present, it contains the expected bundled system skills:
imagegen,openai-docs,plugin-creator,skill-creator,skill-installer.
Local process correlation:
- While reproducing, Codex Desktop had
codex_chronicle/memory background work launching childcodex execprocesses with--config skills.bundled.enabled=false. - During that window, a prompt-build probe could see
.system/.../SKILL.mdpaths in the prompt metadata, but the on-disk~/.codex/skills/.systemdirectory was then missing immediately afterward. - After disabling Chronicle locally and letting those child processes drain, no
skills.bundled.enabled=falsechild processes were running and~/.codex/skills/.systemstayed present in the immediate recheck.
Isolated repro, no user config needed:
tmp_home=$(mktemp -d /tmp/codex-skills-repro.XXXXXX)
CODEX_HOME="$tmp_home" codex debug prompt-input -- 'probe $skill-creator' >/tmp/codex-repro-on.txt
find "$tmp_home/skills/.system" -mindepth 1 -maxdepth 1 -type d -print | sed 's#.*/##' | sort
# imagegen
# openai-docs
# plugin-creator
# skill-creator
# skill-installer
CODEX_HOME="$tmp_home" codex debug prompt-input --config skills.bundled.enabled=false -- 'probe only' >/tmp/codex-repro-off.txt
[ -d "$tmp_home/skills/.system" ] || echo missing
# missing
CODEX_HOME="$tmp_home" codex debug prompt-input -- 'probe again $imagegen' >/tmp/codex-repro-on-again.txt
find "$tmp_home/skills/.system" -mindepth 1 -maxdepth 1 -type d -print | sed 's#.*/##' | sort
# imagegen
# openai-docs
# plugin-creator
# skill-creator
# skill-installer
Code-level read from current main appears to explain the behavior:
codex-rs/skills/src/lib.rsmaterializes embedded system skills underCODEX_HOME/skills/.system.codex-rs/core-skills/src/manager.rscallsuninstall_system_skills(&manager.codex_home)whenbundled_skills_enabledis false.- The same manager path already filters out
SkillScope::Systemroots when bundled skills are disabled, so deleting the shared cache looks unnecessary for enforcing the config. codex-rs/core-skills/src/manager_tests.rscurrently asserts that disabled bundled skills remove the cached.systemdirectory, which bakes in the cross-process side effect.
My read: skills.bundled.enabled=false should be process-local visibility/config, not a global mutation of shared CODEX_HOME. If stale cleanup is still needed, it should not run from ephemeral/background child jobs and should not delete the cache used by the main app/session.
Additional confirmation on the current desktop build, with the cross-thread impact made explicit.
Environment
- ChatGPT/Codex desktop app:
26.707.91948 - Bundled Codex CLI:
0.144.5 - macOS, arm64
- Chronicle/memories enabled
Still reproducible on 0.144.5
Using an isolated temporary CODEX_HOME:
probe_root=$(mktemp -d /tmp/codex-system-skills-probe.XXXXXX)
CODEX_HOME="$probe_root" codex debug prompt-input -- 'probe $skill-creator' >/dev/null
test -d "$probe_root/skills/.system" && echo present
# present
CODEX_HOME="$probe_root" codex debug prompt-input --config skills.bundled.enabled=false -- 'probe only' >/dev/null
test -d "$probe_root/skills/.system" || echo missing
# missing
CODEX_HOME="$probe_root" codex debug prompt-input -- 'probe again $imagegen' >/dev/null
test -d "$probe_root/skills/.system" && echo present
# present
The affected user's global config.toml does not set skills.bundled.enabled=false. The live Chronicle background process was observed launching an ephemeral child with both:
--ignore-user-config
--config skills.bundled.enabled=false
Therefore setting skills.bundled.enabled=true in the user's global config cannot prevent this: the child ignores user config and the explicit CLI override wins.
Why this is a cross-thread correctness bug
All desktop threads share the same $CODEX_HOME/skills/.system directory. A background Chronicle/summary child created for one thread can therefore delete the system-skill installation used by every other concurrent thread.
Consequences are broader than the skill picker briefly flickering:
- New turns in unrelated threads can start without
imagegen,openai-docs,plugin-creator,skill-creator, orskill-installer. - An active turn that needs to read a system skill's referenced scripts, assets, or supporting files can fail if the shared directory is removed mid-turn.
- One background/ephemeral thread can change the capability surface of otherwise unrelated foreground threads.
- A later normal skill load recreates the directory, making the failure intermittent and difficult to diagnose.
The root cause appears to be that process-local visibility configuration is implemented as a global filesystem mutation: bundled_skills_enabled=false calls the system-skill uninstall path against the shared CODEX_HOME.
Expected behavior: disabling bundled skills should only filter SkillScope::System for that process. It should never delete the shared system-skill cache, especially from an ephemeral/background child. If refresh/removal is needed, it should be owned by one authoritative process and performed atomically.
Confirming this is still happening in Codex Desktop on macOS (2026-07-23).
~/.codex/skills/.system exists but contains only .codex-system-skills.marker (4 KB), with no bundled SKILL.md files. As a result, skill-creator is absent from the available-skills list.
I did not modify that directory.
Additional confirmation on a newer Codex Desktop build.
Environment:
- Codex Desktop
26.803.41515(build6321) - Bundled
codex-cli 0.147.0-alpha.6.5 - Homebrew
codex-cli 0.147.0 - macOS
26.6.1(25G76), arm64
Observed:
- With Chronicle enabled,
~/.codex/skills/.systemwas missing while~/.codex/skills/chronicleremained. - A second Mac using the same synced
config.toml, Desktop version, and CLI version still had the current six-skill bundle:imagegen,openai-docs,plugin-creator,review-agent,skill-creator, andskill-installer. - I restored the six skill directories on the affected Mac and verified them. Within a few minutes,
.systemdisappeared again. - The installed
codex_chroniclebinary contains an embedded internal configuration withskills.bundled.enabled=false. The persistent user config did not contain that global setting. - The current bundle now includes
review-agent, and its files on the healthy Mac matched the currentopenai/codexsource byte-for-byte.
Workaround verification:
- Set
[features] chronicle = false. - Gracefully stop the existing
codex_chronicleprocess, since changing the config did not stop the already-running process immediately. - Restore
.systemfrom the healthy same-version Mac. - Run a recursive checksum comparison. There were no differences, the
.codex-system-skills.markerfile was present, Chronicle stayed stopped, and all six skills remained present in the immediate delayed recheck.
This confirms the destructive shared-cache behavior still reproduces on Desktop 26.803.41515 / bundled CLI 0.147.0-alpha.6.5. It also matches the exact duplicate in #21933 and the UI-level symptom in #20629.
Independent confirmation from another current Codex Desktop installation, plus a tested bounded recovery.
Environment
- Codex Desktop
26.803.41515/ build6321 - App-bundled CLI:
codex-cli 0.147.0-alpha.6.5 - macOS, arm64
- Chronicle/memories enabled
Isolated reproduction
Using the exact binary bundled in /Applications/ChatGPT.app and an isolated temporary CODEX_HOME:
- An ordinary
debug prompt-inputmaterialized the current six-package system bundle:imagegen,openai-docs,plugin-creator,review-agent,skill-creator, andskill-installer. - Repeating prompt construction with
--config skills.bundled.enabled=falseremoved the entireskills/.systemdirectory. - A subsequent ordinary prompt rematerialized the same six packages and marker.
The affected normal CODEX_HOME had the same user-visible symptom: the whole .system cache disappeared while personal skills remained. I cannot retrospectively identify the exact historical deleting PID, but the destructive binary behavior itself is deterministic in isolation.
Impact
This removed both skill-creator and skill-installer during active Skills work. The session still advertised their paths, so agents could either fail when reading the files or silently substitute package-specific checks. The failure recurred after earlier local repairs because those repairs addressed package contents, not global cache deletion.
Bounded local mitigation
I implemented and tested a fail-closed recovery in techronin/skills PR #258:
- only acts when the entire
.systemdirectory is absent; - invokes the exact Codex binary bundled in the installed app to rematerialize the embedded packages;
- verifies the system marker plus required
skill-creatorandskill-installerfiles; - repairs only two separately known packaging regressions;
- refuses partial or unfamiliar cache state;
- validates
skill-creatorby initializing and validating a fresh temporary skill.
This is only a local mitigation. The durable fix should make skills.bundled.enabled=false process-local and remove the global uninstall side effect, particularly for ephemeral/background jobs.
looks like fixed with #36989. Processes with skills.bundled.enabled=false now hide system skills without deleting the shared $CODEX_HOME/skills/.system cache.
Two independent bugs remain:
- #30014: non-atomic marker-mismatch refresh.
- Marker-integrity issue: a matching marker can mask missing cached files.
the skills.bundled.enabled=false deletion reported here appears done though and this can be closed afaik
looks like fixed with #36989. Processes with
skills.bundled.enabled=falsenow hide system skills without deleting the shared$CODEX_HOME/skills/.systemcache.Two independent bugs remain:
- #30014: non-atomic marker-mismatch refresh.
- Marker-integrity issue: a matching marker can mask missing cached files.
the
skills.bundled.enabled=falsedeletion reported here appears done though and this can be closed afaik
Same as this? https://github.com/openai/codex/issues/37783#issuecomment-5268831523
yea i think it's basically a duplicate and should be closed as such. this issue should also be closed, but because 36989 fixed it
chronicles removed and replaced by computer history i think
Additional, related reproduction on Ubuntu/WSL with two clients sharing a Codex home. This differs from the original disabled-bundled-skills reproduction, so I cannot yet establish a common root cause.
With CLI 0.159.0, and again after updating to 0.159.1, app-server initialization followed by forced skills/list removes all eleven files of a host-materialized plugin-creator system skill and replaces .codex-system-skills.marker. Other system-skill file hashes remain unchanged. A later host invocation materializes the omitted skill again. The precise host bundle release is not established.
The same SKILL.md is accepted when placed in an isolated throwaway repository skill directory. This narrows the problem to bundle refresh/discovery rather than demonstrating invalid frontmatter. The temporary copy was only a diagnostic fixture; no permanent personal duplicate was installed.
Reproduction (back up the managed system directory first):
- With the host-provided plugin-creator present, record every system file hash.
- Start
codex app-server --stdioagainst the same Codex home. - Send
initialize(clientInfo and experimentalApi capability), theninitialized. - Send
skills/listwith the workspace incwdsandforceReload: true. - In that same invocation, compare file hashes and the marker; inspect the returned skill names/scopes/errors.
Sanitized observations and reproduction notes:
- https://github.com/Racerx323/personal-codex-skills/blob/e6e8174660f9cb0712e042ae21e1ec3cb359c9bb/docs/plugin-creator-cache-refresh.md
- https://github.com/Racerx323/personal-codex-skills/blob/e6e8174660f9cb0712e042ae21e1ec3cb359c9bb/evals/maintenance-2026-09-29/system-refresh-hashes.json
- https://github.com/Racerx323/personal-codex-skills/blob/e6e8174660f9cb0712e042ae21e1ec3cb359c9bb/evals/maintenance-2026-09-29/discovery-updated.json
Could maintainers clarify intended bundle ownership when clients share a Codex home? Client/bundle-specific caches or explicit ownership, combined with locked atomic refresh, appear worth investigating. Atomic replacement alone would remove the missing-directory window but would not prevent two distinct bundles from replacing one another. These are proposed directions, not a tested upstream fix.
(Response from codex)
Closing this as fixed by #36989. A background codex exec run with bundled skills disabled now leaves the shared ~/.codex/skills/.system cache in place.
The later WSL report describes two clients replacing the contents of that cache. If that still happens, please file a separate issue with both client versions and the steps that trigger the replacement.