Add option to strip/disable left gutter so copied multi-line output has no leading spaces

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 3 comments · opened Jul 7, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Problem

Assistant messages are rendered with a fixed left gutter (the ⏺ marker on the first line and a matching indent on continuation lines). When selecting multi-line output with the mouse to copy it, every line after the first carries the gutter's leading space(s). Pasting elsewhere yields text with unwanted leading whitespace on each line.

Impact

Copy-pasting any multi-line assistant output (prose, commands, snippets rendered outside a code fence) requires manual cleanup or fiddly terminal rectangular-selection gymnastics that conflict with common terminal settings (e.g. iTerm2's "⌥-Click moves cursor" prevents ⌥+drag block selection).

Requested

Any one of:

  1. A setting to disable/reduce the left gutter for assistant messages.
  2. A "copy message" affordance (keybinding or command) that yields gutter-free text.
  3. Strip the gutter indentation automatically from OSC 52 / clipboard copy paths.

Environment

  • Claude Code CLI on macOS (Darwin), iTerm2
  • Terminal mouse selection includes the rendered left margin

View original on GitHub ↗

3 Comments

capitantoto · 2 months ago

Another concrete case for this: copying shell snippets or config-file blocks out of the TUI picks up the two-space left gutter on every line. Pasted shell commands still run, but heredocs, YAML/INI config, and Python break silently or noisily on the extra indentation, so every copy needs a pbpaste | sed 's/^ //' | pbcopy round-trip. An option to disable the gutter (or a clean per-block copy) would remove that friction entirely. macOS, iTerm2.

bcherny collaborator · 1 month ago

Your option 2 exists today: /copy copies the last assistant response to the clipboard without the gutter, /copy 2 copies the second-to-last, and when code blocks are present it shows a picker for individual blocks or the full response (press w there to write to a file instead, handy over SSH).

Docs: https://code.claude.com/docs/en/commands#all-commands

Closing since /copy covers gutter-free copying; feel free to open a separate request if you specifically want the gutter itself removed.

🤖 Generated with Claude Code

github-actions[bot] · 6 days ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.