CLI output has left-margin indentation that breaks copy-paste

Resolved 💬 4 comments Opened Feb 11, 2026 by mrlerch Closed Feb 15, 2026

Description

All text output from Claude Code CLI has left-margin indentation/padding on every line. When selecting and copying text from the terminal, the extra leading spaces are included, which breaks pasted commands and code blocks.

Steps to Reproduce

  1. Run claude in any terminal
  2. Ask it to output a code block or shell command
  3. Select the output text and copy it
  4. Paste it — notice extra leading whitespace on every line

Environment

  • macOS (Darwin 24.6.0)
  • Reproducible in both Terminal.app (standard macOS terminal) and Warp
  • Claude Code stable channel

Expected Behavior

Output lines should start at column 0 (or at least copy cleanly without invisible padding). Code blocks and commands should be copy-pasteable without manual whitespace cleanup.

Actual Behavior

Every output line appears to have a left margin/indent baked into the rendering. Copying from terminal captures these extra spaces, making pasted commands and code unusable without manual editing.

Notes

  • This does not happen in the desktop Claude app (claude.ai), which renders code in proper <code> blocks with a copy button — both the copy button and manual text selection work correctly there.
  • A practical workaround in the CLI would be a copy-to-clipboard mechanism for code blocks, similar to what the desktop app provides.
  • This is especially painful for shell commands and multi-line code snippets where indentation matters (Python, YAML, etc.).

View original on GitHub ↗

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