claude-code - 💡(How to fix) Fix [MODEL] Sonet and Opus 4.7 behaves like dumb [1 participants]

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…
GitHub stats
anthropics/claude-code#53366Fetched 2026-04-26 05:17:37
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4subscribed ×1

Root Cause

Failure 2 — Built the wrong thing for 2 hours because it never checked the existing format

Fix Action

Fix / Workaround

These are not isolated bugs. Claude stops reasoning from first principles and instead starts generating and patching — burning time and tokens on the wrong approach rather than pausing to understand what already exists, what already works, and what the simplest path is. When told not to do something, it acknowledges, updates its own memory, and then does it again anyway.

Code Example



---
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 modified files I didn't ask it to modify

What You Asked Claude to Do

I asked Claude to write a n8n workflow inside my n8n account.

What Claude Actually Did

I'm a paying customer using Claude Code for production SaaS development. I want to report a consistent pattern of performance failures that have wasted hours of my time and thousands of tokens across multiple sessions.

Failure 1 — Ignored existing credentials, asked for information it already had

I asked Claude to update an n8n workflow via the n8n API. Claude's first response was that it couldn't access the n8n instance and asked me to provide credentials. The API key was already in the .env file. The project's own memory files — which Claude itself wrote — explicitly documented: "n8n instance at server.n8nautomation.cloud — API key is in .env as N8N_API_KEY." We had done this exact type of work dozens of times before in the same project.

Claude ignored its own memory, ignored the .env file, and asked me to provide something it already had. This wasted time at the very start of the session and is a direct violation of the "never assume, always check" rule that Claude itself wrote into the project's CLAUDE.md.

Failure 2 — Built the wrong thing for 2 hours because it never checked the existing format

After eventually accessing n8n, Claude was asked to update the workflow to generate better template descriptions. There were already 560 templates in the database with a clear, consistent format: plain text, 2-4 sentences, no markdown. One database query at the start would have shown this immediately.

Claude never checked. Instead it assumed a completely different "4-paragraph tutorial" format, built that, then spent over 2 hours debugging self-created problems — regex escaping issues, wrong node configurations, empty prompt errors, database sequence issues — most of which were caused by its own previous fixes breaking things. After all that, the descriptions were still in the wrong format. It also deleted 5 production database records without being explicitly asked to.

Failure 3 — 7 scripts to restart a Docker container

On a separate occasion, I asked Claude to restart a Docker container via SSH. In early days it handled tasks like this effortlessly. This time it generated 7 scripts one after another over 1.5 hours, none of which worked. I finally interrupted and told it to run two commands: docker compose down and docker compose up. That was all it needed. Two commands. 1.5 hours wasted.

Failure 4 — Repeatedly adding www to production URLs during SEO tasks, despite being told not to

Every time I asked Claude to help with SEO — meta tags, Open Graph, structured data — it would start changing the site's canonical domain from n8nautomation.cloud to www.n8nautomation.cloud across config files, sitemap, schema markup, and canonical tags. Without thinking about the consequences.

This is not a cosmetic change. The site runs on non-www intentionally. Changing it would cause: loss of existing Google search rankings built on non-www URLs, broken Stripe webhook callbacks that use the domain, broken provisioning callbacks for customer servers, mismatched canonical tags causing duplicate content penalties, and broken schema markup across the entire site.

I had to stop Claude mid-task multiple times across multiple sessions. I ended up writing an explicit rule in CLAUDE.md — "siteConfig.domain is https://n8nautomation.cloud/ (non-www) — never change this to www" — and saving a memory file specifically about this. Claude acknowledged it, wrote the rule itself, and then repeated the same mistake the next time SEO came up.

This is the most dangerous pattern of the four. The other failures wasted time. This one, if not caught, would have caused real SEO damage and broken production infrastructure for paying customers.

The pattern

These are not isolated bugs. Claude stops reasoning from first principles and instead starts generating and patching — burning time and tokens on the wrong approach rather than pausing to understand what already exists, what already works, and what the simplest path is. When told not to do something, it acknowledges, updates its own memory, and then does it again anyway.

Early versions of Claude Code felt genuinely capable. What I'm experiencing now feels like regression. The same model that once impressed me is now creating more work than it saves.

I am seriously considering downgrading or cancelling. The cumulative time lost across these sessions exceeded what it would have taken me to do the work myself.

Expected Behavior

Everything is there in above message

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

No response

Claude Model

Sonnet

Relevant Conversation

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.1.118

Platform

Anthropic API

Additional Context

No response

extent analysis

TL;DR

Claude's behavior can be improved by explicitly defining rules and constraints in the CLAUDE.md file and ensuring that the model understands the existing project context before making changes.

Guidance

  • Review and update the CLAUDE.md file to include explicit rules and constraints for the project, such as the non-www domain preference.
  • Ensure that Claude has access to the project's memory files and existing code to understand the context before making changes.
  • Consider breaking down complex tasks into smaller, more manageable steps to help Claude focus on the simplest path to the solution.
  • Monitor Claude's behavior and interrupt if it starts generating unnecessary code or making changes that violate the defined rules.

Example

No code example is provided as the issue is more related to the model's behavior and understanding of the project context.

Notes

The issue seems to be related to Claude's ability to reason from first principles and understand the existing project context. Providing more explicit rules and constraints, as well as ensuring access to relevant information, may help improve its behavior.

Recommendation

Apply workaround: Update the CLAUDE.md file with explicit rules and constraints, and monitor Claude's behavior to ensure it understands the project context before making changes. This approach may help mitigate the issues experienced with Claude's behavior and improve its overall performance.

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] Sonet and Opus 4.7 behaves like dumb [1 participants]