openai / openai/codex

System skills marker can falsely validate an incomplete `.system` cache

Open
#38,914 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug skills
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Summary

A matching .codex-system-skills.marker can make Codex accept an incomplete cache without repairing it. Unlike #19265 (disabled-process deletion, fixed by #36989) or #30014 (non-atomic refresh), no refresh occurs: the marker matches, so missing content is trusted.

Environment
  • Codex Desktop 26.810.41047 (build 6570), macOS arm64
  • App-bundled CLI: /Applications/ChatGPT.app/Contents/Resources/codex (0.148.0-alpha.9)
  • Binary SHA-256: 7a26b07855ef91194c8d1bf58d15970878ee11458253df328d38fec0c87ec192
  • Tested: 2026-08-16
Reproduction

This uses an isolated CODEX_HOME; it does not touch the normal cache:

probe_home="$(mktemp -d /private/tmp/codex-system-skills-marker.XXXXXX)"
bundle="/Applications/ChatGPT.app/Contents/Resources/codex"
system_root="$probe_home/skills/.system"
marker="$system_root/.codex-system-skills.marker"
missing_file="$system_root/skill-creator/SKILL.md"

CODEX_HOME="$probe_home" "$bundle" debug prompt-input -- 'probe' >/dev/null
find "$system_root" -type f | wc -l
test -f "$marker"
test -f "$missing_file"
marker_hash_before="$(shasum -a 256 "$marker" | awk '{print $1}')"

rm -f -- "$missing_file"
find "$system_root" -type f | wc -l

CODEX_HOME="$probe_home" "$bundle" debug prompt-input -- 'probe again' >/dev/null
find "$system_root" -type f | wc -l
test -f "$missing_file" && echo restored || echo missing
marker_hash_after="$(shasum -a 256 "$marker" | awk '{print $1}')"
test "$marker_hash_before" = "$marker_hash_after" && echo marker-unchanged

Observed result:

initial:        59 files
after deletion: 58 files
after rerun:    58 files; missing file not restored
marker changed: no
Cause and expected behavior

The install_system_skills fast path returns when .system exists and its marker matches the fingerprint derived from the embedded payload. It does not verify the on-disk files.

Missing or modified expected content should invalidate and repair the cache. Otherwise, a partial cache can persist until the marker changes or the directory is manually removed, leaving built-in skills or supporting files unavailable.

This reproduces a current integrity gap; it does not attribute any historical partial-cache report to this cause.

Acceptance criteria
  • Matching-marker caches with a missing or modified expected file are detected and repaired.
  • Validation covers every expected embedded file; complete caches retain a fast path.
  • Regression tests cover both missing and modified files.
  • Repair preserves the publication guarantees tracked in #30014.
Related issues

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codex-rs/skills/src/lib.rs at install_system_skills and run the isolated CODEX_HOME reproduction from the issue. Trace the matching-marker fast path and its embedded-file expectations, then add regression coverage for missing and modified files while preserving the publication guarantees from #30014. Done means incomplete matching-marker caches are repaired and complete caches retain the fast path.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.