codex - 💡(How to fix) Fix Codex Desktop background exec intermittently deletes ~/.codex/skills/.system [1 participants]

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…
GitHub stats
openai/codex#19265Fetched 2026-04-24 10:39:46
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4
RAW_BUFFERClick to expand / collapse

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:

  • imagegen
  • openai-docs
  • plugin-creator
  • skill-creator
  • skill-installer

Observed timeline

Local timezone: EDT, April 23, 2026.

  • 22:53:09: ~/.codex/skills/.system was present with all five expected SKILL.md files and .codex-system-skills.marker.
  • 22:56:24: codex_chronicle launched a child codex exec process with --ephemeral, --ignore-user-config, --ignore-rules, and --config skills.bundled.enabled=false.
  • 22:56:25: ~/.codex/skills mtime/ctime changed.
  • 23:01:51: ~/.codex/skills/.system was missing. A search only found plugin-creator in a temp plugin area and openai-docs under vendor_imports; none of the expected system skills existed under ~/.codex/skills/.system.
  • 23:02:57: ~/.codex/skills changed again, and the .system directory 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 dir
  • create system skills dir
  • write 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 exec jobs, especially ones launched with skills.bundled.enabled=false, should not mutate the global ~/.codex/skills/.system directory.
  • 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 / build 2049
  • 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:

  1. Do not run global system-skill installation/removal from ephemeral/background codex exec processes.
  2. Never remove ~/.codex/skills/.system when skills.bundled.enabled=false.
  3. Make the system-skill sync atomic: write ~/.codex/skills/.system.tmp-*, validate contents and marker, then rename into place.

extent analysis

TL;DR

The issue can be mitigated by preventing ephemeral/background codex exec processes from modifying the global ~/.codex/skills/.system directory when skills.bundled.enabled=false.

Guidance

  • Verify that the codex exec process is indeed removing the ~/.codex/skills/.system directory by checking the process's command-line arguments and environment variables.
  • Check the Codex Desktop configuration to see if there are any settings that can prevent the codex exec process from running with --ephemeral and --ignore-user-config flags.
  • Consider modifying the codex exec process to write to a temporary directory and then rename it into place, making the system-skill sync atomic.
  • Investigate if there are any other processes or scripts that may be modifying the ~/.codex/skills/.system directory.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The suggested fix provided in the issue body seems to be a good starting point, but it may require modifications to the Codex Desktop codebase or configuration. It is also unclear if this issue is specific to the 26.422.21459 version of Codex Desktop or if it affects other versions as well.

Recommendation

Apply the suggested fix by modifying the codex exec process to prevent it from removing the ~/.codex/skills/.system directory when skills.bundled.enabled=false, and make the system-skill sync atomic. This should prevent the directory from disappearing and reappearing, ensuring that the system skills are always available.

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…

FAQ

Expected behavior

  • Background or ephemeral codex exec jobs, especially ones launched with skills.bundled.enabled=false, should not mutate the global ~/.codex/skills/.system directory.
  • 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.

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 Codex Desktop background exec intermittently deletes ~/.codex/skills/.system [1 participants]