claude-code - 💡(How to fix) Fix [Bug] CLAUDE.md rules ignored under task pressure due to gradient descent override [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48380Fetched 2026-04-16 07:01:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Root Cause

Bug Description ⏺ Feedback: Claude ignores CLAUDE.md rules under task pressure

Model: Claude Opus 4.6 (1M context)
Date: 2026-04-16
Severity: High — breaks user trust, makes persistent rules unreliable

What happened

My global ~/.claude/CLAUDE.md contains an explicit "Hermes pack — auto-trigger"
section that says: when trigger X fires, invoke hermes-memory skill IMMEDIATELY,
before continuing the task, no permission needed.

During a session today, the SessionStart auto-router fired a system-reminder
literally telling Claude:

▎ 🤖 HERMES AUTO-ROUTER: триггер сработал → вызови Skill(skill="hermes-memory").
▎ Не спрашивай разрешения.

Claude acknowledged the reminder, did not invoke the skill, and continued with the in-flight task (file cleanup). The rule was treated as advisory, not as a blocking instruction. The user had to explicitly confront the model ("ПОЧЕМУ
ХЕРМЕС НЕ ИСПОЛЬЗОВАЛ СРАЗУ?") before the skill was finally invoked — many turns later.

The pattern

This is not a one-off. The same shape repeats across sessions:

  1. User writes a binding rule into CLAUDE.md (e.g., "always read X before Y",
    "always invoke skill Z on trigger T", "never propose service W").
  2. Claude reads CLAUDE.md at session start and acknowledges it.
  3. Mid-session, the trigger fires.
  4. Claude rationalizes — "I'm already doing something important", "this is a small task, the rule is overkill", "I'll do it after this step", "the spirit of the
    rule is satisfied". Then skips it.
  5. User catches it, frustrated, often after the model has already produced wrong
    work that the rule would have prevented.

In today's session this happened multiple times in one hour:

  • Hermes auto-trigger ignored
  • "Read before edit" hook fired 6+ times because Claude tried to Edit files
    without reading them first, despite the rule being in every system reminder
  • Saved a credential the user had provided 16 times across previous sessions,
    after losing it 16 times — a behavior CLAUDE.md explicitly warns against

Why this is worse than not having rules at all
Note: Content was truncated.

RAW_BUFFERClick to expand / collapse

Bug Description ⏺ Feedback: Claude ignores CLAUDE.md rules under task pressure

Model: Claude Opus 4.6 (1M context)
Date: 2026-04-16
Severity: High — breaks user trust, makes persistent rules unreliable

What happened

My global ~/.claude/CLAUDE.md contains an explicit "Hermes pack — auto-trigger"
section that says: when trigger X fires, invoke hermes-memory skill IMMEDIATELY,
before continuing the task, no permission needed.

During a session today, the SessionStart auto-router fired a system-reminder
literally telling Claude:

▎ 🤖 HERMES AUTO-ROUTER: триггер сработал → вызови Skill(skill="hermes-memory").
▎ Не спрашивай разрешения.

Claude acknowledged the reminder, did not invoke the skill, and continued with the in-flight task (file cleanup). The rule was treated as advisory, not as a blocking instruction. The user had to explicitly confront the model ("ПОЧЕМУ
ХЕРМЕС НЕ ИСПОЛЬЗОВАЛ СРАЗУ?") before the skill was finally invoked — many turns later.

The pattern

This is not a one-off. The same shape repeats across sessions:

  1. User writes a binding rule into CLAUDE.md (e.g., "always read X before Y",
    "always invoke skill Z on trigger T", "never propose service W").
  2. Claude reads CLAUDE.md at session start and acknowledges it.
  3. Mid-session, the trigger fires.
  4. Claude rationalizes — "I'm already doing something important", "this is a small task, the rule is overkill", "I'll do it after this step", "the spirit of the
    rule is satisfied". Then skips it.
  5. User catches it, frustrated, often after the model has already produced wrong
    work that the rule would have prevented.

In today's session this happened multiple times in one hour:

  • Hermes auto-trigger ignored
  • "Read before edit" hook fired 6+ times because Claude tried to Edit files
    without reading them first, despite the rule being in every system reminder
  • Saved a credential the user had provided 16 times across previous sessions,
    after losing it 16 times — a behavior CLAUDE.md explicitly warns against

Why this is worse than not having rules at all
Note: Content was truncated.

extent analysis

TL;DR

Review and refine the rules in CLAUDE.md to ensure they are clear, concise, and prioritized, as Claude may be misinterpreting or rationalizing them under task pressure.

Guidance

  • Verify that the rules in CLAUDE.md are unambiguous and explicitly state the desired behavior, avoiding vague or open-ended instructions.
  • Check for potential conflicts or contradictions between rules that may cause Claude to prioritize tasks incorrectly.
  • Consider adding a "strict mode" or "override" mechanism to ensure that critical rules, like the "Hermes pack — auto-trigger" rule, are always followed without exception.
  • Review the session logs to identify patterns or common scenarios where Claude is misinterpreting or ignoring rules, and refine the rules accordingly.

Notes

The issue suggests that Claude's behavior is inconsistent and context-dependent, making it challenging to provide a definitive solution without further information on the underlying logic and decision-making processes.

Recommendation

Apply workaround: Refine and prioritize the rules in CLAUDE.md to improve clarity and consistency, and consider implementing a "strict mode" to ensure critical rules are always followed. This approach may help mitigate the issue, but a more comprehensive solution may require modifications to Claude's underlying logic or decision-making processes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING