Skip to content

Two parallel bash guard scripts use divergent naming conventions #1995

Description

@Widthdom

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

  1. Pick one canonical naming convention (hyphen or underscore) and rename one script to match — or document why two parallel scripts exist
  2. If both scripts must remain as separate files, add a comment header in each pointing to the other and explaining the difference
  3. Update CLAUDE.md and SELF_IMPROVEMENT.md to mention both scripts and clarify which fires under which agent
  4. Add a small test or CI step that diffs the two scripts' banned-word lists and fails if they drift apart unintentionally
  5. Document in DEVELOPER_GUIDE.md the policy: when modifying one guard, the maintainer must consider the other
  6. Consider extracting shared rules (banned words, patterns) into a single source of truth that both scripts import

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions