[BUG] Repeated violations of explicit rules in CLAUDE.md

Resolved 💬 1 comment Opened May 17, 2026 by Predictable-Dave Closed Jun 16, 2026

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?

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.
  1. 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.
  1. 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.
  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.
  1. 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_

View original on GitHub ↗

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