Claude attempts to create existing file instead of fixing import path

Resolved 💬 5 comments Opened Jan 8, 2026 by ThatDragonOverThere Closed Feb 21, 2026

Bug Description

When debugging a batch file error, Claude:

  1. Correctly identified the problem (file moved to archive, import path broken)
  2. Instead of fixing the import path, attempted to recreate the entire 900+ line file in a new location
  3. Dumped the entire file content into a "Do you want to create..." prompt

Expected Behavior

Claude should have:

  • Fixed the import path in the batch file, OR
  • Told me the file was moved and asked how I wanted to fix it

Instead it tried to recreate iqfeed_internals_realtime.py from scratch (or memory?), outputting hundreds of lines of code.

Context

  • User asked to debug why START_LIVE_STREAMING.bat reported IQFeed not connected
  • Claude found the file was moved to archive/legacy_scripts/
  • Claude then attempted to create a new file with the full implementation

Environment

  • OS: Windows 11
  • Claude Code CLI

🤖 Generated with Claude Code

View original on GitHub ↗

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