[MODEL] Desktop app: Claude ignores explicit instructions to use provided code

Resolved 💬 3 comments Opened Apr 12, 2026 by brandaddy79 Closed Apr 16, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I provided code written by an external AI tool (Gemini) and explicitly
instructed Claude to replace existing code with the provided code exactly,
without modifications.

What Claude Actually Did

Claude ignored the provided code and rewrote it in its own way instead,
effectively substituting its own interpretation rather than executing
the explicit instruction. This was consistent enough that I had to switch
to a different tool (Codex) to make the changes work correctly.

Expected Behavior

Claude should have replaced the specified code with exactly
the provided code, without modification or interpretation.

Files Affected

Single HTML file game project. Claude rewrote portions of the 
file using its own code instead of the explicitly provided 
replacement code.

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

  1. Open a project in Claude Code desktop app
  2. Paste code from an external source (e.g. Gemini) into the prompt
  3. Explicitly instruct Claude to replace existing code with

the provided code exactly

  1. Claude rewrites the code in its own way instead of using

the provided code

Claude Model

Sonnet

Relevant Conversation

I pasted code from Gemini and said something like "replace 
the existing [section] with this code exactly." Claude 
acknowledged the instruction but then rewrote the code in 
its own style instead of using the provided code.

Impact

High - Significant unwanted changes

Claude Code Version

Claude 1.1617.0 (8d6345)

Platform

Anthropic API

Additional Context

This behavior has been consistent since approximately February/March 2026,
which aligns with the widely reported performance regression. I am a solo
indie developer building a mobile game (single HTML file, 10,000+ lines).
The issue made Claude Code unreliable enough as a primary tool that I
switched to OpenAI Codex for tasks requiring precise code replacement.
This is part of a broader pattern reported by many developers where Claude
stopped thoroughly reading files before making changes.

View original on GitHub ↗

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