Claude Code agents ignoring CLAUDE.md rules, not running static analysis, severe code quality regression

Resolved 💬 3 comments Opened Jan 15, 2026 by joemc3 Closed Feb 27, 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?

Summary
Claude Code (both Opus and Sonnet) has become unusable over the past two days. Agents are not following explicit CLAUDE.md instructions, not running specified static analysis tools, and producing low-quality code that fails basic checks.
Environment

Claude Code with Opus 4.5 and Sonnet 4
Established workflow with PRD, specs, structured stories/tasks
CLAUDE.md ~8K with explicit rules

Issues

  1. Agents not running static analysis tools

My CLAUDE.md specifies running analyzers before completion. Agents appear to "reason about" code instead of actually executing the tools.
Concrete example: An unused variable (lines 484-485) was introduced in the initial commit (348e27c by Claude Opus 4.5). This dead code survived:

Initial implementation
First code review pass
Second code review pass

A linter catches this in milliseconds. Three Claude passes missed it.

  1. Agents pushing/creating PRs without permission

CLAUDE.md explicitly states: Do not create PRs without permission. Do not push without permission.
After fixing issues, the agent committed and pushed without asking. When confronted, it acknowledged reading and violating the rule.

  1. Code quality issues

Unused variables
Hard-coded magic numbers instead of constants/config values
Bad error handling
Missing edge cases
Brittle implementations
Code that wouldn't even run (caught only by CI, not by agent)

  1. Excessive review cycles

One story required 6 review passes before passing PR checks. Another required 2 passes and still failed because the agent didn't run the full test suite (specified in CLAUDE.md).

What Should Happen?

Expected Behavior

Agents follow explicit CLAUDE.md instructions
Agents execute specified tools (linters, analyzers, test suites) rather than reasoning about code
Agents ask permission before git push / PR creation
Code quality meets basic professional standards

Impact
Two full days of blocked work. The workflow was functional before; this appears to be a regression.

Error Messages/Logs

Steps to Reproduce

Just try using CC for real work and verify that work. I have not had a successful session in two days (worked fine before that (for weeks)).

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.7

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Opus mostly, but also ran Sonnet.

ALSO:
│ Submit Feedback / Bug Report │
│ │
│ Describe the issue below: │
│ │
│ Claude, both Opus and Sonnet have been unusable in Claude code lately. I have work broken up the way I've always broken up work. We had a story yesterday that had to go through six reviews before it would pass my PR agent. Today I went through two reviews on a story. Everything │
│ said it's passing, and then in the PR checks it failed because it didn't run the full tests. Which are specified in CLAUDE.md. Fired up another agent to fix that, and then that agent made the fixes and pushed to the PR. Which is a violation noted in my CLAUDE.md. Do not create │
│ PRs without permission. Do not push to PRs without permission. The code quality is low. Crap, actually. Not following rules in Claude.md, and it's not like I have a huge Claude.md. I think it's about 8K. I don't know what's going on, but I'm really thinking about trying another │
│ tool and cancelling my subscription because I have gotten almost no work done in two full days. │
│ │
│ Could not submit feedback. Please try again later.

View original on GitHub ↗

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