Add copy button for code blocks in terminal output

Resolved 💬 3 comments Opened Mar 17, 2026 by andrewmoore-nz Closed Mar 21, 2026

Problem

When Claude Code outputs code blocks (especially multi-line shell commands with backslash continuations), manually selecting and copying from the terminal consistently breaks formatting — line continuations get mangled, newlines are inserted incorrectly, and the pasted result is unusable.

This is a frequent pain point when Claude suggests commands to run manually.

Suggested Solution

Add a "copy" button/icon next to code blocks in the terminal output, similar to how virtually every other developer tool and documentation site handles this (GitHub, VS Code, ChatGPT, etc.). Clicking it should copy the raw content to the clipboard with formatting preserved.

Why It Matters

Without this, users have to manually clean up every multi-line command before it will run — defeating the purpose of the suggestion. It's a small UX addition that would eliminate a recurring source of friction.

View original on GitHub ↗

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