claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open alexeyv opened this issue 2 months ago • 2 comments

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

Image

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

alexeyv avatar Dec 08 '25 12:12 alexeyv