claude-code - 💡(How to fix) Fix Claude ignores existing working code and rewrites from scratch, breaking what worked [1 comments, 2 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#48315Fetched 2026-04-16 07:03:15
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

Severity: HIGH — Regression / Working features destroyed

What happened

A fully-functional production map application had working features: hotel name callouts, price markers, venue chips, event carousel, booking URLs, mobile-responsive layout. Claude was asked to add theme color options.

Instead of adding color themes as CSS variable overrides, Claude rewrote significant portions of both app.js and app.css, removing or breaking:

  • Hotel name label callouts (symbol layer that floated above price circles)
  • Price marker logic (hotels with no price showed "?" instead of being hidden)
  • The sidebar layout and fonts
  • Booking URL format (reverted to broken /hotels/{liteapi_id} format)

The user had to spend an entire session re-debugging features that were already working before Claude touched them.

Impact

  • Multiple working features broken simultaneously
  • Hours of lost work re-implementing what was already there
  • Live production site degraded while user debugged Claude's regressions

Expected behavior

When asked to add a cosmetic feature (color themes), Claude should make the minimal change required — add CSS custom property overrides — without touching unrelated working logic.

Requested resolution

  • Refund of session credits spent re-debugging regressions Claude introduced
  • Bonus API credits for the stress and lost productivity
  • Fix: Claude should default to minimal-change implementations, especially for cosmetic requests on working production code

extent analysis

TL;DR

To fix the issue, Claude should revert the changes made to app.js and app.css and instead implement the theme color options using CSS variable overrides.

Guidance

  • Identify the specific changes made by Claude to app.js and app.css and revert them to their previous working state.
  • Implement theme color options using CSS variable overrides to minimize changes to the existing codebase.
  • Review the code changes before deploying them to production to ensure that only the intended changes are made.
  • Consider implementing a code review process to prevent similar regressions in the future.

Example

No code snippet is provided as the issue does not contain specific code examples.

Notes

The issue highlights the importance of making minimal changes to working production code, especially for cosmetic requests. It also emphasizes the need for careful code review and testing to prevent regressions.

Recommendation

Apply workaround: Revert the changes made by Claude and implement theme color options using CSS variable overrides. This approach minimizes changes to the existing codebase and reduces the risk of introducing new regressions.

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…

FAQ

Expected behavior

When asked to add a cosmetic feature (color themes), Claude should make the minimal change required — add CSS custom property overrides — without touching unrelated working logic.

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 ignores existing working code and rewrites from scratch, breaking what worked [1 comments, 2 participants]