[BUG] Edit tool incorrectly inserts \n instead of newlines

Status Closed — not planned
Maintainer reply None cached
Activity 3 comments · opened Aug 13, 2025 · closed Jan 3, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code
  • Claude CLI version: 1.0.77
  • Operating System: Ubuntu 24.04.2 LTS
  • Terminal: bash

Bug Description

  • Edit tool incorrectly handles newlines: When using \n in replacement strings, the tool inserts literal \n characters instead of actual newlines
  • Expected behavior: \n should be converted to actual newline characters
  • Impact: Creates malformed code that requires manual cleanup

Model • /model
L opusplan (claude-opus-4-1-20250805)

View original on GitHub ↗

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