[BUG] Refactoring python code, Claude has issues with indenting using these tool-based edits

Resolved 💬 6 comments Opened Jun 27, 2025 by walt93 Closed Jan 13, 2026

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.34 (Claude Code)
  • Operating System: macOS 15.3,
  • Terminal: IntelJIdea

Bug Description

Refactoring python code, you have to watch Claude like a hawk. Test everything. EVERYTHING.

Issue: finding random blocks of code that are at the wrong indentation level after a refactoring.

Steps to Reproduce

  1. Write a ton of python code
  2. Have Claude work in it using tool based edits
  3. Hilarity ensues

Expected Behavior

Indentation at the expected level

Actual Behavior

Wild and zany adventures debugging white space

View original on GitHub ↗

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