[BUG] Naughty Claude made a bogus edit to a file not under consideration in the current task
Resolved 💬 3 comments Opened Jun 3, 2025 by walt93 Closed Nov 30, 2025
Environment
- Platform (select one):
- [√] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.9 (Claude Code)
- Operating System: macOS 15.3
- Terminal: IntelliJ IDEA (Ultimate Edition) Build #IU-231.8770.65
Bug Description
I directed Claude to fix a bug in a specific file, the models danced for some time and came to a fix. At the end, a .sql file which is related but needed no change took a drive by hit.
% git diff video_cuts_schema.sql
diff --git a/video_cuts_schema.sql b/video_cuts_schema.sql
index ed350bb..cb500cf 100644
--- a/video_cuts_schema.sql
+++ b/video_cuts_schema.sql
@@ -1,4 +1,4 @@
--- Database: truth_tide_categories
+Clau-- Database: truth_tide_categories
So it opened a .sql file and inserted "Clau-".
Seemed odd.
Steps to Reproduce
- Ask Claude to fix a bug in a vague hand wavey way
- Observe Claude spinning for some time searching hither and thither
- Observe Claude ask for permission to run a tool to check the sql database
- Use this opportunity to interject and tell Claude where to find things
- Claude completes the task
Reviewing the diff, I note the .sql file change.
Expected Behavior
Not to insert "Clau-" into a file not being edited.
Actual Behavior
A file not being edited, was.
Additional Context
There was a lot going on...
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗