2-space indent and hard wrap at 80 breaks copy-paste - Need a way to configure it out of the way

Open 💬 13 comments Opened Dec 8, 2025 by alexeyv

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

## Description
Claude Code adds a 2-space indent to all code block content and hard-wraps at ~80
characters. When copying commands from the terminal, these artifacts get included,
breaking pasted commands.

## The Irony
I am posting this bug report verbatim as Claude Code output it - complete with the
2-space indent and 80-char wrap. The bug demonstrates itself.

## Environment

  • Claude Code version: [run claude --version]
  • Terminal: [your terminal]
  • OS: [your OS]

## Related Issues
#4686, #6827, #4004

What Should Happen?

## Expected Behavior
Either:

  • No indent in code blocks
  • Soft wrap instead of hard wrap
  • Or: a config option to disable this formatting (--no-indent, --no-wrap, etc.)

Error Messages/Logs

n/a

Steps to Reproduce

## Steps to Reproduce

  1. Ask Claude Code for any command longer than 80 characters
  2. Copy from terminal
  3. Paste - note extra spaces where lines wrapped

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.61

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="629" height="313" alt="Image" src="https://github.com/user-attachments/assets/129d92e5-5748-4b52-b0c0-ef413ee23557" />

Pardon my irritation. I feel like I step on this landmine 10 times a day.

View original on GitHub ↗

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