Summary
There are two separate Bash guard scripts in this repo with divergent naming conventions: .codex/hooks/bash_guard.py (underscore) referenced from .codex/hooks.json:9, and .claude/hooks/bash-guard.py (hyphen) referenced from .claude/settings.json:152,183. CLAUDE.md and SELF_IMPROVEMENT.md document only the hyphenated variant. New maintainers must learn that there are two parallel guard scripts and that bash_guard.py (Codex side) is silently undocumented in the entry-point markdown. A drift between the two scripts (e.g., adding a banned word to one but not the other) would cause asymmetric enforcement across Codex vs Claude Code with no tooling to detect the divergence.
Where
.codex/hooks.json:9 (references .codex/hooks/bash_guard.py)
.claude/settings.json:152,183 (references .claude/hooks/bash-guard.py)
.codex/hooks/bash_guard.py (underscore script)
.claude/hooks/bash-guard.py (hyphen script)
CLAUDE.md:19 (only mentions hyphen variant)
SELF_IMPROVEMENT.md:44 (only mentions hyphen variant)
Suggested approach
- Pick one canonical naming convention (hyphen or underscore) and rename one script to match — or document why two parallel scripts exist
- If both scripts must remain as separate files, add a comment header in each pointing to the other and explaining the difference
- Update CLAUDE.md and SELF_IMPROVEMENT.md to mention both scripts and clarify which fires under which agent
- Add a small test or CI step that diffs the two scripts' banned-word lists and fails if they drift apart unintentionally
- Document in DEVELOPER_GUIDE.md the policy: when modifying one guard, the maintainer must consider the other
- Consider extracting shared rules (banned words, patterns) into a single source of truth that both scripts import
Summary
There are two separate Bash guard scripts in this repo with divergent naming conventions:
.codex/hooks/bash_guard.py(underscore) referenced from.codex/hooks.json:9, and.claude/hooks/bash-guard.py(hyphen) referenced from.claude/settings.json:152,183. CLAUDE.md and SELF_IMPROVEMENT.md document only the hyphenated variant. New maintainers must learn that there are two parallel guard scripts and thatbash_guard.py(Codex side) is silently undocumented in the entry-point markdown. A drift between the two scripts (e.g., adding a banned word to one but not the other) would cause asymmetric enforcement across Codex vs Claude Code with no tooling to detect the divergence.Where
.codex/hooks.json:9(references.codex/hooks/bash_guard.py).claude/settings.json:152,183(references.claude/hooks/bash-guard.py).codex/hooks/bash_guard.py(underscore script).claude/hooks/bash-guard.py(hyphen script)CLAUDE.md:19(only mentions hyphen variant)SELF_IMPROVEMENT.md:44(only mentions hyphen variant)Suggested approach