What problem does it solve?
Cleans up old Codex crew state files that accumulate in the local .codex/crew/ directory and can clutter runs, cycles, and seed artifacts.
Core Features & Use Cases
- Dry-run cleanup planning: Shows exactly which files and directories would be deleted before making changes.
- Safe optional deletion: Requires
--apply to actually delete targets after the user sees the dry-run output or explicitly requests it.
- Targeted retention policy: Removes older
seed-*.md (excluding the seed-latest.md target), stale runs/<run-id>/ and cycles/<cycle-id>/, and prunes history files by line count (keeping the newest 200 lines).
- Use case: When you’ve run multiple Codex crew sessions over weeks, use this skill to restore a clean workspace without accidentally deleting the most recent seed state.
Quick Start
Run crew-cleanup in dry-run mode to preview what will be deleted from .codex/crew/ before applying changes.