Code blocks have padding that breaks copy-paste in terminal
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
- Ask Claude Code to output a multi-line shell command in a code block
- Select the rendered output in the terminal
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗