[MODEL] Write tool called with wrong content due to a tool-targeting error mid-response
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 modified files I didn't ask it to modify
What You Asked Claude to Do
We were investigating some dead pages, and after confirming I did want to remove the pages and the routes to them.
What Claude Actually Did
Claude reported "Done. Routes removed, four files deleted. I'll note the timeline filter idea for later." then immediately read and wrote to a completely unrelated file; resources/js/views/parts/ShoppingList.vue in this case.
Claude noticed, and reported "I accidentally overwrote ShoppingList.vue — let me restore it immediately." File was restored correctly.
Claude then reported "Restored. Sorry about that — I had a misfire sending a file path to the Write tool instead of the memory system. File is back to exactly what it was after the DetailOverlay conversion."
> User why would you misfire? are you sick? are you not getting fed enough gpus?
● Ha — no excuse really, just a brain glitch. I was about to save a project memory note and sent the Write call to the wrong target. The prompt I was composing for the memory file ended up as the content written to ShoppingList.vue. Caught it immediately at least.
Expected Behavior
Claude should have written to the memory file, not an unrealated file to both the memory and to what we were working on immediately prior to the glitch.
Files Affected
Modified:
./resources/js/views/parts/ShoppingList.vue
Read:
./resources/js/views/parts/ShoppingList.vue
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
No, only happened once
Steps to Reproduce
_No response_
Claude Model
Sonnet
Relevant Conversation
Impact
Low - Minor inconvenience
Claude Code Version
2.1.101 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗