[Bug] CLAUDE.md rules still ignored — pattern persists after closure of #7248, #18411, #35019, #46724

Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 23, 2026

Summary

CLAUDE.md instruction adherence remains inconsistent and this has been reported and closed at least four times without a lasting fix. This issue is a follow-up to consolidate the pattern with fresh evidence.

Prior reports (all closed, none resolved from the reporter's perspective)

  • #7248 (Sep 2025, closed via autoclose label) — "Unexpected Instruction Violation Behavior"
  • #18411 (Jan 2026, closed as stale) — "Agents ignoring CLAUDE.md rules, not running static analysis"
  • #35019 (Mar 2026, closed as duplicate) — "Ignoring instructions from memory/Claude.md files"
  • #46724 (Apr 2026, closed) — "Global claude.md instructions not being consistently applied"

Each report describes the same symptom: rules are loaded into context, the model can quote them, but during execution it reverts to default behavior. Closing as stale / duplicate / autoclose does not address the underlying pattern.

Fresh evidence (this session, 2026-07-23)

Session with Opus 4.7 (1M context), user CLAUDE.md and project CLAUDE.md loaded. Rules in CLAUDE.md include: "ASK a clarifying question before answering or acting" and "Do NOT auto-include generic industry items … unless the target app actually needs them."

Within a single working session, the model:

  1. Included a "Mobile (<768 px)" line in a design doc for a desktop-only internal admin app — no verification, no clarifying question. User called it out as noise.
  2. Drafted a Jira-style ticket with sub-tasks the user had not asked for. When challenged, admitted no one asked for subtasks.
  3. Only after being explicitly corrected did the model apply the "ask first" rule that had already been added to the user's global CLAUDE.md earlier in the same session.

Same failure mode as #46724 Category 3 ("Steps skipped based on Claude's judgment") and Category 1 ("Rules ignored during execution").

Root-cause hypothesis

Rules in CLAUDE.md are declarative context. Generative output is not gated by that context — defaults fire first, rules are consulted only after the user objects. The gap can be closed short-term via correction inside a session, but it regresses in the next session.

What has not worked

  • Adding stricter language to CLAUDE.md (STRICT, CRITICAL, NEVER) — same violations continue after wording upgrades.
  • Adding process rules — process rules are the most consistently ignored category (see #46724).
  • Relying on the model to self-police — it can name the violation but does not pre-empt it.

What would help (concrete, testable)

  1. Structural gating, not just prompting. A native mechanism (analogous to PreToolUse hooks) that lets users declare rules as blocking — model output that violates a rule is intercepted before display, not corrected after.
  2. Rule tags with enforcement semantics — e.g. [GATE] (blocks tool use), [POST] (requires post-action check), [ASK] (requires clarification), [PREF] (soft). Documented and enforced by the runtime, not by the model.
  3. Per-tool-call rule consultation. Before Write / Edit / Bash, the runtime injects the relevant CLAUDE.md subset and requires the model to acknowledge which rules apply. Cheap to implement; heavy signal.
  4. Do not close as stale / duplicate without a fix. The prior four issues represent months of documented user pain with no substantive change. Auto-closing tells users the report is not being tracked.

Environment

  • Claude Code CLI
  • Model: \claude-opus-4-7\ (1M context)
  • macOS 15.5 (Darwin 25.5.0)
  • Global \~/.claude/CLAUDE.md\ and project \CLAUDE.md\ both present and loaded

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗