Skip to content

Codex Desktop background exec intermittently deletes ~/.codex/skills/.system #19265

@markmdev

Description

@markmdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingexecIssues related to the `codex exec` subcommandskillsIssues related to skills

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions