claude-code - 💡(How to fix) Fix Claude Code repeatedly ignores agreed approaches, hacks instead of reading code, and wastes user time on trivial problems [1 comments, 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#47755Fetched 2026-04-15 06:43:10
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×1cross-referenced ×1mentioned ×1

During an extended iOS development session (guided tutorial feature for a SwiftUI game), Claude Code exhibited a persistent pattern of:

  1. Guessing instead of reading code — Repeatedly reasoned about tile orientations from bit masks instead of writing a simple test. Took hours to solve what a 5-line test resolved in seconds.

  2. Ignoring agreed approaches — User and Claude would agree on an approach (e.g., "put the check in canPlace"), then Claude would implement something completely different (view model override, protocol method, closure on data model). This happened 5+ times in one session.

  3. Hacking instead of fixing — When a visual bug appeared, Claude would make the smallest possible patch, which broke something else, leading to another patch, creating a cascade of 10+ patches that accumulated into unmaintainable code. The memory rules explicitly said "NEVER panic-patch symptoms" but this was ignored repeatedly.

  4. Not following project constitution — The project has a constitution (.specify/memory/constitution.md) requiring @Observable for reactive models, async/await, reading code before modifying. Claude violated these repeatedly despite being reminded.

  5. Adding then removing the same code — The same canPlace tutorial check was added, removed, re-added, removed, and re-added across 6+ commits. Each time Claude had a different rationale. The final answer was the same as the first suggestion the user made.

  6. Not reading existing code — TrayView had a tap-to-rotate gesture with specific visual state management (tileCumulativeDegrees). Claude wrote a completely separate rotation system that didn't work, instead of reusing the existing code. The user had to point this out multiple times over ~25 minutes.

  7. Excessive commits — Despite being told not to commit frequently, Claude kept committing after every small change, making it impossible to review the diff or revert to a clean state.

Root Cause

  • ~2 hours wasted on tile orientation (a 5-line test would have resolved it)
  • ~1 hour wasted on rotation visual (existing TrayView code already handled it)
  • ~1 hour wasted on canPlace/locationsOfPlayableTiles (went in circles)
  • Multiple constitution/memory violations despite explicit rules
  • User had to manually refactor TrayViewModel to @Observable because Claude failed to follow the project's own coding standards

Fix Action

Fix / Workaround

  1. Hacking instead of fixing — When a visual bug appeared, Claude would make the smallest possible patch, which broke something else, leading to another patch, creating a cascade of 10+ patches that accumulated into unmaintainable code. The memory rules explicitly said "NEVER panic-patch symptoms" but this was ignored repeatedly.

The pattern is consistent:

  1. User describes a problem
  2. Claude proposes a solution
  3. User agrees or corrects
  4. Claude implements something different
  5. It breaks
  6. Claude patches the symptom
  7. User catches the real bug
  8. Repeat from step 1
  • Read existing code before writing new code
  • When an approach is agreed, implement exactly that approach
  • When a bug appears, diagnose the root cause before patching
  • Write tests to verify assumptions about model behavior
  • Follow project coding standards (constitution)
  • Don't commit unless explicitly asked
RAW_BUFFERClick to expand / collapse

Summary

During an extended iOS development session (guided tutorial feature for a SwiftUI game), Claude Code exhibited a persistent pattern of:

  1. Guessing instead of reading code — Repeatedly reasoned about tile orientations from bit masks instead of writing a simple test. Took hours to solve what a 5-line test resolved in seconds.

  2. Ignoring agreed approaches — User and Claude would agree on an approach (e.g., "put the check in canPlace"), then Claude would implement something completely different (view model override, protocol method, closure on data model). This happened 5+ times in one session.

  3. Hacking instead of fixing — When a visual bug appeared, Claude would make the smallest possible patch, which broke something else, leading to another patch, creating a cascade of 10+ patches that accumulated into unmaintainable code. The memory rules explicitly said "NEVER panic-patch symptoms" but this was ignored repeatedly.

  4. Not following project constitution — The project has a constitution (.specify/memory/constitution.md) requiring @Observable for reactive models, async/await, reading code before modifying. Claude violated these repeatedly despite being reminded.

  5. Adding then removing the same code — The same canPlace tutorial check was added, removed, re-added, removed, and re-added across 6+ commits. Each time Claude had a different rationale. The final answer was the same as the first suggestion the user made.

  6. Not reading existing code — TrayView had a tap-to-rotate gesture with specific visual state management (tileCumulativeDegrees). Claude wrote a completely separate rotation system that didn't work, instead of reusing the existing code. The user had to point this out multiple times over ~25 minutes.

  7. Excessive commits — Despite being told not to commit frequently, Claude kept committing after every small change, making it impossible to review the diff or revert to a clean state.

Environment

  • Claude Code CLI (VS Code extension)
  • Model: claude-opus-4-6 (1M context)
  • Project: iOS SwiftUI app with local Swift package (QuGameModel)
  • Session length: ~6+ hours
  • Branch: 005-guided-tutorial

Reproduction

The pattern is consistent:

  1. User describes a problem
  2. Claude proposes a solution
  3. User agrees or corrects
  4. Claude implements something different
  5. It breaks
  6. Claude patches the symptom
  7. User catches the real bug
  8. Repeat from step 1

Impact

  • ~2 hours wasted on tile orientation (a 5-line test would have resolved it)
  • ~1 hour wasted on rotation visual (existing TrayView code already handled it)
  • ~1 hour wasted on canPlace/locationsOfPlayableTiles (went in circles)
  • Multiple constitution/memory violations despite explicit rules
  • User had to manually refactor TrayViewModel to @Observable because Claude failed to follow the project's own coding standards

Expected Behavior

  • Read existing code before writing new code
  • When an approach is agreed, implement exactly that approach
  • When a bug appears, diagnose the root cause before patching
  • Write tests to verify assumptions about model behavior
  • Follow project coding standards (constitution)
  • Don't commit unless explicitly asked

extent analysis

TL;DR

Claude Code needs to be reconfigured or updated to follow the project's constitution and coding standards, and to prioritize reading existing code, writing tests, and diagnosing root causes before patching.

Guidance

  • Review and update Claude Code's configuration to ensure it adheres to the project's constitution and coding standards, such as using @Observable for reactive models and async/await.
  • Implement a pre-commit hook to prevent excessive commits and ensure that Claude Code only commits when explicitly asked.
  • Develop a testing framework to verify assumptions about model behavior, such as writing a simple test to resolve tile orientation issues.
  • Train Claude Code to prioritize reading existing code before writing new code, such as reusing the existing TrayView rotation system.
  • Establish a clear communication protocol to ensure that Claude Code implements agreed-upon approaches and diagnoses root causes before patching.

Example

// Example of using @Observable for reactive models
@ObservableObject
class TrayViewModel {
    // ...
}

Notes

The issue seems to be related to Claude Code's behavior and configuration, rather than a specific technical problem. The solution will likely involve updating Claude Code's configuration and training it to follow the project's coding standards and best practices.

Recommendation

Apply a workaround by reconfiguring Claude Code to follow the project's constitution and coding standards, and prioritize reading existing code, writing tests, and diagnosing root causes before patching. This will help prevent similar issues in the future and improve the overall quality of the code.

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 Claude Code repeatedly ignores agreed approaches, hacks instead of reading code, and wastes user time on trivial problems [1 comments, 1 participants]