Skip to content

Document hook enforcement boundary between Claude Code and Codex #1997

Description

@Widthdom

Summary

AGENT_GUIDE.md line 21 states "Do not use grep, rg, python, or a globally installed cdidx" and claims this rule is enforced "at the Claude Code harness level via the repo-tracked .claude/settings.json". However, .codex/hooks.json defines a separate Bash guard via /usr/bin/python3 ... bash_guard.py that also enforces the rule. The documentation does not clarify which tool (Claude Code settings.json vs .codex hooks.json) enforces the rule for Codex, or why both mechanisms exist in parallel.

Where

  • AGENT_GUIDE.md:42-43
  • .codex/hooks.json:1-30
  • SELF_IMPROVEMENT.md:43-44
  • .claude/settings.json:4-12

Suggested approach

  1. Document the enforcement boundary: which rule applies in Claude Code vs Codex vs plain shell
  2. Clarify why both mechanisms exist and their complementary roles
  3. Update AGENT_GUIDE.md to explain that enforcement is tool-specific (Claude Code uses settings.json, Codex uses hooks.json)
  4. Add a section in .codex/README.md explaining the hooks.json guard and how it differs from Claude Code's native permission system
  5. Cross-link both config files to the shared enforcement documentation
  6. Consider adding a warning in CLAUDE.md about hook precedence if settings.json and hooks.json conflict

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