Code blocks have padding that breaks copy-paste in terminal

Resolved 💬 3 comments Opened Feb 13, 2026 by mcmillion Closed Feb 16, 2026

Description

When Claude Code outputs multi-line code blocks (e.g., shell commands), the rendered output includes horizontal padding on both sides. When a user selects and copies this text from the terminal to paste into another terminal or SSH session, the padding characters get included in the copied text, breaking the command.

Steps to Reproduce

  1. Ask Claude Code to output a multi-line shell command in a code block
  2. Select the rendered output in the terminal
  3. Copy and paste it into another terminal window or SSH session

Expected Behavior

Copied text from code blocks should be clean and directly pasteable without extra whitespace or padding characters.

Actual Behavior

The padding around the code block content gets included when copying, which breaks the pasted command.

Impact

This is especially painful when Claude outputs commands that need to be run on a remote server (where Claude can't execute them directly). The user has to manually clean up every pasted command, which defeats the purpose of having Claude generate them.

View original on GitHub ↗

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