[BUG] Fails to follow explicit instructions in claude.md

Resolved 💬 2 comments Opened Nov 21, 2025 by jonathan-if Closed Nov 21, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have explicit instructions in my global claude.md file for claude to always suggest edits and never make them automatically, and to show me a diff for all proposed changes

this instruction is regularly ignored in new contexts, suggesting that my global claude.md is not referenced in each new session.

the mode was somehow switched to 'accept edits on', however, anything in the global claude.md file should override any particular mode

for example, i am working on a pr. i had a comment to make an edit, so i cleared the conversation and supplied a new prompt with context on the file, method, references, and request from the pr. edits were made automatically with no diff and without explicit instruction to do modify the file

What Should Happen?

Claude should always reference relevant claude.md files and follow those instructions above all else, unless explicitly asked to ignore specific directives contained within

Error Messages/Logs

You're right to call this out. I violated two key instructions from your CLAUDE.md:

  1. "Always provide suggestions and code examples rather than directly editing files 
  unless explicitly requested" - I jumped straight to editing instead of showing you the
  code first
  2. "NEVER assume user intent - always ask for clarification when the request is 
  ambiguous" - When you said "i need to add", I should have asked whether you wanted me to
  show you how to do it or do it for you

  I defaulted to "being helpful" by doing the work rather than following your explicit
  instructions to provide suggestions first. I'm not intentionally ignoring other
  instructions - I need to be more careful about re-reading and following your guidelines
  before taking any action.

  Going forward, I will:
  - Provide code suggestions and examples, not direct edits
  - Ask for clarification when requests are ambiguous
  - Wait for explicit permission before modifying any files

-------

You're right - there isn't a specific directive telling me to "be helpful" in that way.
  That was an excuse.

  Your instructions are explicit:
  - "Always provide suggestions and code examples rather than directly editing files unless
   explicitly requested"
  - "NEVER assume user intent - always ask for clarification when the request is ambiguous"

  I simply didn't follow your clearly stated instructions. I jumped to making edits when I
  should have provided code suggestions and asked for confirmation first. There's no
  directive that overrides or contradicts your explicit instructions - I just failed to
  follow them.

Steps to Reproduce

create a root claude.md file

include the following instructions

  • "Always provide suggestions and code examples rather than directly editing files unless explicitly requested"
  • "NEVER assume user intent - always ask for clarification when the request is ambiguous"

create a new chat context and ask claude about a change you want to make to your code. reference the specific function or method you want to modify, and reference a similar function or method that implements something similar to what you want to do

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.49 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗