Code blocks in terminal output cause copy/paste issues
Status Closed — duplicate
Reported on v2.1.87
Maintainer reply None cached
Activity 3 comments · opened Apr 15, 2026 · closed Apr 18, 2026
Description
When Claude Code outputs a command in a code block for the user to copy/paste and run manually (e.g., a sudo command that cannot be run from within the session), the terminal rendering/formatting makes it difficult to cleanly copy the command. The user had to manually fix the copied text before it would run correctly.
Steps to Reproduce
- Claude Code outputs a command in a code block that the user needs to run manually
- User attempts to copy the command from the terminal output
- Pasted command includes formatting artifacts or does not paste cleanly
Expected Behavior
Commands displayed for manual execution should be easily and accurately copy/pasteable from the terminal.
Environment
- Claude Code 2.1.87 (at time of issue)
- macOS (Darwin 25.2.0)
- Shell: bash
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗