Text output uses hard newlines instead of terminal soft-wrap
Resolved 💬 2 comments Opened Mar 18, 2026 by ajiblock Closed Mar 18, 2026
Problem
Claude Code pre-wraps its text output with hard newline characters (\n) at the terminal width instead of letting the terminal handle soft-wrapping naturally. This causes two issues:
- Broken clipboard copy — When copying Claude Code output from a terminal, the hard newlines are preserved, producing broken text when pasted. Terminal emulators can join soft-wrapped lines on copy (e.g., Ghostty's
unwrap=true), but they can't distinguish Claude Code's wrapping newlines from intentional paragraph breaks.
- No reflow on resize — When the terminal window is resized, soft-wrapped text reflows automatically. Hard-wrapped text stays broken at the old width.
Reproduction
- Run Claude Code in a terminal ~120 columns wide
- Get a response with a paragraph longer than the terminal width
- Select the wrapped text, copy it (Cmd+C / Ctrl+Shift+C)
- Paste it elsewhere — hard newlines appear at the old wrap points
Expected behavior
Claude Code should emit long text lines without inserting newlines at the terminal width. Let the terminal handle soft-wrapping. This is how most CLI tools work (e.g., cat, echo, python -c "print('...')") and it enables:
- Clean clipboard copy (terminal can join soft-wrapped lines)
- Proper reflow on window resize
- Better behavior with terminal tools that process text
Workaround
None currently. The hard newlines are baked into the terminal output.
Environment
- Claude Code 2.1.78
- macOS, Ghostty 1.3.1
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗