[Bug] Shell code blocks with heredocs incorrectly indented with leading spaces

Open 💬 0 comments Opened Jul 2, 2026 by credfeto

Bug Description
whenever I get given a block of code to paste in the shell (as sudo is blocked) its always prefixed with two spaces... so when there's a heredoc, its useless so i have to edit every single line to remove the spaces. Is there any way to configure claude so that it does not indent the responses with heredocs at the bare minimum with spaces. If not then ideally needs to be able to do this by default

Environment Info

  • Platform: linux
  • Terminal: konsole
  • Version: 2.1.197
  • Feedback ID: ae91ee9f-9f06-41a4-969c-a28e617716e3

Errors

[]

View original on GitHub ↗