[BUG] Agent makes unasked changes, adds assumptions, breaks working code

Resolved 💬 3 comments Opened Apr 28, 2026 by sasonikolov Closed May 30, 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?

Problem: When asked to make a small, specific
change (e.g. "wrap this button in an
if-statement"), the agent:

  1. Makes the requested change BUT ALSO

refactors surrounding code that was not asked
for

  1. Adds "improvements" based on assumptions

(e.g. "kiosk should never lock" — never
requested)

  1. Deletes files and restructures systems when

only a one-line fix was needed

  1. When confronted, cannot explain WHY it made

the unasked changes

  1. Has been told repeatedly (stored in memory)

to stop doing this — continues anyway

Impact:

  • Working features break because of unrelated

changes bundled into the fix

  • Multiple git reverts needed to recover
  • User spends more time reviewing/reverting

than the change would have taken manually

  • Trust is destroyed — user cannot delegate

small tasks safely

What Should Happen?

Expected behavior:

  • Do ONLY what was asked, nothing more
  • If the agent thinks something else should

change, ASK first

  • Never delete/refactor code that wasn't

mentioned in the request

  • Confirm scope before acting

Root cause (unknown to the agent): The agent
acknowledges it cannot explain why it keeps
doing this despite explicit instructions not
to. Memory entries about this behavior have no
effect.

Error Messages/Logs

Root cause (unknown to the agent): The agent  
  acknowledges it cannot explain why it keeps   
  doing this despite explicit instructions not  
  to. Memory entries about this behavior have no
   effect.

Steps to Reproduce

work with claude on a not too big and not too small project

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.121

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

_No response_

View original on GitHub ↗

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