Code blocks in terminal output cause copy/paste issues

Resolved 💬 3 comments Opened Apr 15, 2026 by tvpmb 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

  1. Claude Code outputs a command in a code block that the user needs to run manually
  2. User attempts to copy the command from the terminal output
  3. 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

View original on GitHub ↗

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