Claude Code users debate enforcing rules beyond CLAUDE.md
A Reddit discussion highlights Anthropic's guidance that CLAUDE.md and auto memory provide context to Claude Code but are not enforced configuration. The thread asks users which rules they moved into hooks or tests, citing OpenAI's Codex team's reported use of a roughly 100-line AGENTS.md map alongside linters and tests for critical invariants.
The discussion offers a practical distinction between guidance that Claude Code can read and safeguards that can block or validate actions.
Anthropic's memory docs for Claude Code say CLAUDE.md and auto memory are both loaded at the start of every conversation, but Claude treats them as context, not enforced configuration. For anything that has to happen no matter what, the docs point to hooks (a PreToolUse hook can block an action).
That's easy to nod along to and still leave mandatory rules as polite sentences in a markdown file.
OpenAI's Codex team wrote something related in their Feb 2026 harness engineering post. Their "one big AGENTS.md" approach failed (context crowded out, rules went stale), so they cut it to a roughly 100-line map that points to deeper docs, and enforced the invariants that mattered with linters and tests instead of prose.
I'm curious how people here actually split it:
- What lives in CLAUDE.md (conventions, where things are, how to run stuff)?
- What did you move into a hook or a test because Claude kept missing it?
- What did you delete because it stopped being true?
Sources: Claude Code docs ("How Claude remembers your project"), OpenAI "Harness engineering: leveraging Codex in an agent-first world" (Feb 11, 2026).
submitted by /u/ombre-ai [link] [comments]