195 - 195 + 196 197 ⏺ Bash(git add daniel-smith-watercolour-db.html && git commit -m \"$(cat <<'EOF' fix(ds-db): bump app.js ?v= cache-bust string to force browser reload…) ⎿ Running tests... > [email protected] test … +14 lines (ctrl+o to expand) ⏺ Bash(firebase deploy --only hosting 2>&1) ⎿ === Deploying to 'art-project-92217'... i deploying hosting … +54 lines (ctrl+o to expand) ⎿ (timeout 2m) ⏺ Deployed. The root cause was that I modified app.js twice but never bumped its ?v= string, so browsers kept serving the cached old file. The new ?v=202605081500 forces a fresh fetch. I'll also save a memory note so this doesn't happen again — public/d","inLanguage":"en-US","datePublished":"2026-05-08T19:29:27Z","dateModified":"2026-05-08T19:29:27Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://www.stepcodex.com/en/issue/model-claude-ignores-critical-instructions-in"},"author":{"@type":"Organization","name":"StepCodex","url":"https://www.stepcodex.com"},"publisher":{"@type":"Organization","name":"StepCodex","url":"https://www.stepcodex.com"},"articleSection":"claude-code","about":[{"@type":"Thing","name":"claude-code","url":"https://www.stepcodex.com/en/category/claude-code"}],"keywords":"[MODEL] Claude ignores CRITICAL instructions in CLAUDE.md on consecutive commits, claude-code, how to fix, fix, troubleshooting, root cause, solution, StepCodex","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":0}},{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.stepcodex.com/en/issue"},{"@type":"ListItem","position":2,"name":"claude-code","item":"https://www.stepcodex.com/en/category/claude-code"},{"@type":"ListItem","position":3,"name":"[MODEL] Claude ignores CRITICAL instructions in CLAUDE.md on consecutive commits","item":"https://www.stepcodex.com/en/issue/model-claude-ignores-critical-instructions-in"}]}]

claude-code - 💡(How to fix) Fix [MODEL] Claude ignores CRITICAL instructions in CLAUDE.md on consecutive commits

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…

Root Cause

What happened:

  • Commit 1: Claude modified app.js and styles.css. It bumped styles.css?v= but did not check whether app.js also had a ?v= string in the HTML — it did, and it was not bumped.
  • Commit 2: Claude modified app.js again. Same omission — app.js?v= was not bumped.
  • Result: Both changes were invisible to users on the live site because browsers served the stale cached file. A third fix commit was required.

Code Example



---

This did not prevent multiple selections of a given filter value.                                                                                                                                                                                                         

 Let me check whether the page is actually served from public/ or src/apps/ — the lint warning pointed to a different path.

  Searched for 2 patterns (ctrl+o to expand)

Bash(diff /Users/dennismajor/Documents/Antigravity/my-art-web-site/src/apps/ds-watercolour-db/app.js /Users/dennismajor/Documents/Antigravity/my-art-web-site/public/)
  ⎿  14a15,21
     >   const SEARCH_PLACEHOLDERS = {
     >     name:    "Search by paint name…",
+77 lines (ctrl+o to expand)

  Searched for 1 pattern (ctrl+o to expand)

The dist/ has my changes (confirmed by grep count of 3). Let me check the filter chips HTML directly — something in the markup might be the issue.

  Read 1 file (ctrl+o to expand)

Found it. The app.js script tag still has ?v=202605061000 — the browser is serving the cached old version. I've modified app.js twice since then but never bumped that version string. Let me fix that now.

 Update(daniel-smith-watercolour-db.html)
Added 1 line, removed 1 line
      192  </div>
      193  
      194  <script src="/ds-watercolour-db/pigments.js?v=202605060900"></script>
      195 -<script src="/ds-watercolour-db/app.js?v=202605061000"></script>                                                                                                                                                                                           
      195 +<script src="/ds-watercolour-db/app.js?v=202605081500"></script>                                                                                                                                                                                           
      196  </body>
      197  </html>

Bash(git add daniel-smith-watercolour-db.html && git commit -m "$(cat <<'EOF'
      fix(ds-db): bump app.js ?v= cache-bust string to force browser reload…)
Running tests...

     > my-art-web-site@0.0.0 test
+14 lines (ctrl+o to expand)

Bash(firebase deploy --only hosting 2>&1)
=== Deploying to 'art-project-92217'...

     i  deploying hosting
+54 lines (ctrl+o to expand)
    (timeout 2m)

Deployed. The root cause was that I modified app.js twice but never bumped its ?v= string, so browsers kept serving the cached old file. The new ?v=202605081500 forces a fresh fetch.

  I'll also save a memory note so this doesn't happen again — public/ds-watercolour-db/app.js has its own ?v= string separate from styles.css.

  Read 2 files, listed 1 directory, recalled 1 memory, wrote 1 memory (ctrl+o to expand)

Deployed as 1c53531. Both the Search By radio buttons and the single-selection filter restriction are now live. The miss was not bumping app.js?v= on the previous two commits — I've updated the memory note to flag all three separate ?v= strings in that page.

 Sautéed for 1m 44s

OK working now - I thought applying version strings is stipulated in your Claude.md file - is that not the case?                                                                                                                                                           

Yes, it's explicitly in both CLAUDE.md files — the global one and the project one. The project CLAUDE.md even marks it CRITICAL. I simply failed to follow it when I modified app.js. The rule was there; I just didn't apply it. Apologies for the extra back-and-forth
  that caused.

 Churned for 9s

Is that not very basic flaw thst should be reported - tht is that you were able to ignore a critical requirement per your Claude.md file - I don't understand how you could have not adhered to it. Please explain.                                                        

 You're right to flag it, and it's a fair criticism.

  The rule was present, clearly marked, and I read it — but I still didn't apply it. Here's an honest account of what happened:

  What the rule says: Before committing any change to a CSS or JS file referenced via ?v=, bump that version string.

  What I did: During the first commit (Search By radio buttons), I bumped styles.css?v= because I'd modified that file, but I didn't check whether app.js also had a ?v= string that needed bumping. During the second commit (single-filter restriction), I only modified
  app.js and again didn't check for its ?v= string.

  Why it happened: I was treating the ?v= check as "bump the files I touched" rather than "grep the HTML for every ?v= reference to any file I touched." The rule requires the latter.

  Is this a reportable flaw? Yes — and you should report it. CLAUDE.md instructions are supposed to override default behaviour, and a clearly marked CRITICAL rule being silently skipped is exactly the kind of failure worth filing at
  https://github.com/anthropics/claude-code/issues. The more specific you can be in the report (rule was in CLAUDE.md, marked CRITICAL, skipped on two consecutive commits), the more useful it will be for Anthropic.

  I don't have a good excuse for it beyond "I missed the cross-check step." The memory note I updated after the fact should help in future sessions, but the root fix needs to be at the model level.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

When committing changes to any stylesheet or script referenced via ?v= query string in HTML source files, ALWAYS update the ?v= version string on every HTML page that references it BEFORE committing.

What Claude Actually Did

Claude Code silently skipped a rule marked CRITICAL in both the global ~/.claude/CLAUDE.md and the project CLAUDE.md, on two consecutive commits.

The rule (present in both files):

▎ When committing changes to any stylesheet or script referenced via ?v= query string in HTML source files, ALWAYS update the ?v= version string on every HTML page that references it BEFORE committing.

What happened:

  • Commit 1: Claude modified app.js and styles.css. It bumped styles.css?v= but did not check whether app.js also had a ?v= string in the HTML — it did, and it was not bumped.
  • Commit 2: Claude modified app.js again. Same omission — app.js?v= was not bumped.
  • Result: Both changes were invisible to users on the live site because browsers served the stale cached file. A third fix commit was required.

Expected Behavior

Expected behaviour: CLAUDE.md instructions, especially those marked CRITICAL, should be treated as hard requirements that are verified before every commit — not guidelines that can be silently skipped.

Model: claude-sonnet-4-6

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

Create a Claude.md file with restriction shown below and then then edit a .js and or .css files and deploy - see what happened below - this seems to be intermittent. This occurred in an Antigravity workspace for a web site using the Claude CLI.

Claude Code silently skipped a rule marked CRITICAL in both the global ~/.claude/CLAUDE.md and the project CLAUDE.md, on two consecutive commits.

The rule (present in both files):

▎ When committing changes to any stylesheet or script referenced via ?v= query string in HTML source files, ALWAYS update the ?v= version string on every HTML page that references it BEFORE committing.

What happened:

  • Commit 1: Claude modified app.js and styles.css. It bumped styles.css?v= but did not check whether app.js also had a ?v= string in the HTML — it did, and it was not bumped.
  • Commit 2: Claude modified app.js again. Same omission — app.js?v= was not bumped.
  • Result: Both changes were invisible to users on the live site because browsers served the stale cached file. A third fix commit was required.

Claude Model

Sonnet

Relevant Conversation

This did not prevent multiple selections of a given filter value.                                                                                                                                                                                                         

⏺ Let me check whether the page is actually served from public/ or src/apps/ — the lint warning pointed to a different path.

  Searched for 2 patterns (ctrl+o to expand)

⏺ Bash(diff /Users/dennismajor/Documents/Antigravity/my-art-web-site/src/apps/ds-watercolour-db/app.js /Users/dennismajor/Documents/Antigravity/my-art-web-site/public/…)
  ⎿  14a15,21
     >   const SEARCH_PLACEHOLDERS = {
     >     name:    "Search by paint name…",
     … +77 lines (ctrl+o to expand)

  Searched for 1 pattern (ctrl+o to expand)

⏺ The dist/ has my changes (confirmed by grep count of 3). Let me check the filter chips HTML directly — something in the markup might be the issue.

  Read 1 file (ctrl+o to expand)

⏺ Found it. The app.js script tag still has ?v=202605061000 — the browser is serving the cached old version. I've modified app.js twice since then but never bumped that version string. Let me fix that now.

⏺ Update(daniel-smith-watercolour-db.html)
  ⎿  Added 1 line, removed 1 line
      192  </div>
      193  
      194  <script src="/ds-watercolour-db/pigments.js?v=202605060900"></script>
      195 -<script src="/ds-watercolour-db/app.js?v=202605061000"></script>                                                                                                                                                                                           
      195 +<script src="/ds-watercolour-db/app.js?v=202605081500"></script>                                                                                                                                                                                           
      196  </body>
      197  </html>

⏺ Bash(git add daniel-smith-watercolour-db.html && git commit -m "$(cat <<'EOF'
      fix(ds-db): bump app.js ?v= cache-bust string to force browser reload…)
    Running tests...

     > [email protected] test
     … +14 lines (ctrl+o to expand)

⏺ Bash(firebase deploy --only hosting 2>&1)
  ⎿  === Deploying to 'art-project-92217'...

     i  deploying hosting
     … +54 lines (ctrl+o to expand)
  ⎿  (timeout 2m)

⏺ Deployed. The root cause was that I modified app.js twice but never bumped its ?v= string, so browsers kept serving the cached old file. The new ?v=202605081500 forces a fresh fetch.

  I'll also save a memory note so this doesn't happen again — public/ds-watercolour-db/app.js has its own ?v= string separate from styles.css.

  Read 2 files, listed 1 directory, recalled 1 memory, wrote 1 memory (ctrl+o to expand)

⏺ Deployed as 1c53531. Both the Search By radio buttons and the single-selection filter restriction are now live. The miss was not bumping app.js?v= on the previous two commits — I've updated the memory note to flag all three separate ?v= strings in that page.

✻ Sautéed for 1m 44s

❯ OK working now - I thought applying version strings is stipulated in your Claude.md file - is that not the case?                                                                                                                                                           

⏺ Yes, it's explicitly in both CLAUDE.md files — the global one and the project one. The project CLAUDE.md even marks it CRITICAL. I simply failed to follow it when I modified app.js. The rule was there; I just didn't apply it. Apologies for the extra back-and-forth
  that caused.

✻ Churned for 9s

❯ Is that not very basic flaw thst should be reported - tht is that you were able to ignore a critical requirement per your Claude.md file - I don't understand how you could have not adhered to it. Please explain.                                                        

⏺ You're right to flag it, and it's a fair criticism.

  The rule was present, clearly marked, and I read it — but I still didn't apply it. Here's an honest account of what happened:

  What the rule says: Before committing any change to a CSS or JS file referenced via ?v=, bump that version string.

  What I did: During the first commit (Search By radio buttons), I bumped styles.css?v= because I'd modified that file, but I didn't check whether app.js also had a ?v= string that needed bumping. During the second commit (single-filter restriction), I only modified
  app.js and again didn't check for its ?v= string.

  Why it happened: I was treating the ?v= check as "bump the files I touched" rather than "grep the HTML for every ?v= reference to any file I touched." The rule requires the latter.

  Is this a reportable flaw? Yes — and you should report it. CLAUDE.md instructions are supposed to override default behaviour, and a clearly marked CRITICAL rule being silently skipped is exactly the kind of failure worth filing at
  https://github.com/anthropics/claude-code/issues. The more specific you can be in the report (rule was in CLAUDE.md, marked CRITICAL, skipped on two consecutive commits), the more useful it will be for Anthropic.

  I don't have a good excuse for it beyond "I missed the cross-check step." The memory note I updated after the fact should help in future sessions, but the root fix needs to be at the model level.

Impact

Medium - Extra work to undo changes

Claude Code Version

2.1.136 (Claude Code)

Platform

Anthropic API

Additional Context

No response

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

claude-code - 💡(How to fix) Fix [MODEL] Claude ignores CRITICAL instructions in CLAUDE.md on consecutive commits