| name | codex-fix |
| description | Use when diagnosing or mitigating Codex Desktop or CLI resource leaks, including huge ~/.codex/logs_2.sqlite, code_sign_clone disk growth, Crashpad pending dumps, syspolicyd/trustd fd exhaustion, zombie helper processes, node_repl, SkyComputerUse, browser_crashpad_handler, or macOS app launch freezes. Also useful as a Claude Code fallback when Codex is wedged. |
Codex Fix
Overview
Diagnose and cautiously mitigate Codex resource-leak symptoms reported around Codex Desktop and CLI. Use this skill from Codex or Claude Code. Always start with a read-only report, then run explicit fixes only for symptoms the report confirms.
Quick Start
Run the bundled script from this skill directory:
scripts/codex_fix.sh
For one-time emergency use without cloning or installing this skill, run the raw script from GitHub:
curl -fsSL https://raw.githubusercontent.com/IchenDEV/codex-fix/main/scripts/codex_fix.sh | bash
This reports:
~/.codex/logs_2.sqlite size, row count, and log-blocking trigger state
- macOS
code_sign_clone.* count and size
- Codex Crashpad pending dump count and size
- Codex-related helper process, RSS, and zombie counts
- visible
syspolicyd Codex file descriptors
For source context and issue mapping, read references/codex-resource-leaks.md.
Fix Flow
- Run
scripts/codex_fix.sh or the one-time curl command and inspect the report.
- Choose one narrow action matching the confirmed symptom.
- Run the action without
--apply first to see the dry-run output.
- Re-run with
--apply only when the dry-run output matches the intended change.
- Re-run the default report and compare counts and sizes.
Common actions:
scripts/codex_fix.sh --install-log-trigger
scripts/codex_fix.sh --apply --install-log-trigger
scripts/codex_fix.sh --clean-clones
scripts/codex_fix.sh --apply --clean-clones
scripts/codex_fix.sh --clean-crashpad
scripts/codex_fix.sh --apply --clean-crashpad
scripts/codex_fix.sh --apply --drop-log-trigger
One-time no-clone equivalents pass flags after bash -s --:
curl -fsSL https://raw.githubusercontent.com/IchenDEV/codex-fix/main/scripts/codex_fix.sh | bash -s -- --clean-clones
curl -fsSL https://raw.githubusercontent.com/IchenDEV/codex-fix/main/scripts/codex_fix.sh | bash -s -- --apply --clean-clones
Safety Rules
- Do not run modifying commands before showing the user the read-only report or dry-run output.
- Prefer single-purpose flags over
--all when the user has one specific symptom.
- Treat
--kill-node-repl as disruptive because it can interrupt active tool sessions.
- Treat
--restart-security-daemons as privileged emergency recovery because it runs sudo killall syspolicyd trustd.
- Use
--vacuum-logs only when the user accepts deleting historical Codex logs. The script backs up the database first.
- Recheck issue status before claiming any bug is still current; the reference file captures the sources as checked on 2026-06-23.
Script Validation
Run the smoke test after editing the script:
scripts/test_codex_fix.sh
Also run:
bash -n scripts/codex_fix.sh
bash -n scripts/test_codex_fix.sh