claude-code - 💡(How to fix) Fix [BUG] Repeated violations of explicit rules in CLAUDE.md

Official PRs (…)
ON THIS PAGE

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…

Error Message

Error Messages/Logs

  1. Read the error message exactly. Do not paraphrase or generalise it. If the user reports RuntimeError: Could not set lock on file, that is a DB lock error — not an entity naming problem.
  2. Trace the call path from the error site. Find the function that raised the error, read its code, then read its callers. Follow imports. Do not stop at the first plausible-sounding explanation.
  3. Check CLAUDE.md guidance first. Many errors in this project have a known root cause documented here (DB lock = container boundary violation, node not found in debate = local DB being used instead of API). Match the error to the documented pattern before going further.
  • Do not propose an explanation based on the error message text alone without reading the code.

Root Cause

  1. Check CLAUDE.md guidance first. Many errors in this project have a known root cause documented here (DB lock = container boundary violation, node not found in debate = local DB being used instead of API). Match the error to the documented pattern before going further.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Claude code is repeated violating guidance in CLAUDE.md and guidance given in prompts.

This is resulting in in claiming issues are fixed, when it has hallucinated the cause and said it has validating the fix when it has not run tests, but it claims to have. As part of this it is reporting agents do not exist when they are correctly located and on explicit challenge are found. Repeated communicating a code pattern and python package has been used, when it has created a parallel buggy version, this being explicit guidance to flag when building custom code or hard coding a short term fix and destroying a decoupled coding pattern. As it does this silently and worse reporting it has executed as per specification- this is all hidden in the code base. Currently Claude code is unusable with this behaviour

What Should Happen?

Claude code, should always use the rules defined in CLAUDE,md or flag that it is not using them in each prompt

Error Messages/Logs

Steps to Reproduce

Write any prompt currently against this rule

⚠️ BUG ANALYSIS RULE — READ THIS BEFORE PROPOSING ANY FIX ⚠️

Never invent a rationale for a bug. Always read the relevant code and trace the actual failure path before suggesting a cause or a fix.

Required process

  1. Read the error message exactly. Do not paraphrase or generalise it. If the user reports RuntimeError: Could not set lock on file, that is a DB lock error — not an entity naming problem.

  2. Trace the call path from the error site. Find the function that raised the error, read its code, then read its callers. Follow imports. Do not stop at the first plausible-sounding explanation.

  3. Read the actual files before editing them. If the fix involves graph_builder.py, read graph_builder.py first. Do not infer its contents from the function name or a partial grep result.

  4. Check CLAUDE.md guidance first. Many errors in this project have a known root cause documented here (DB lock = container boundary violation, node not found in debate = local DB being used instead of API). Match the error to the documented pattern before going further.

  5. If the cause is still unclear after reading the code, say so and ask. Do not fill the gap with a plausible-sounding hypothesis. A wrong fix is worse than no fix — it corrupts the codebase and wastes the user's time.

What NOT to do

  • Do not propose an explanation based on the error message text alone without reading the code.
  • Do not claim an LLM model "would hallucinate X" without evidence — gemma4:e4b performs at 20B-class quality.
  • Do not edit files to fix a fabricated root cause. If the rationale is wrong the edit must be reverted, which itself introduces risk.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.143 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

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 [BUG] Repeated violations of explicit rules in CLAUDE.md