Copying from terminal output silently drops a chunk of characters starting at a non-ASCII character
Description
When copying text from Claude Code's output in the terminal (both via select-to-copy and manual Cmd+C copy), a contiguous chunk of characters is sometimes silently dropped from the copied text. The user has hit this multiple times; this report documents one fully verified occurrence.
Notably, the dropped span starts exactly at a non-ASCII character (Polish diacritic ą, U+0105), which suggests the bug may be related to multibyte/wide character handling in the TUI rendering or the selection/copy path.
Environment
- Claude Code: 2.1.224
- OS: macOS 15.6.1 (Darwin 24.6.0, arm64)
- Terminal: Apple Terminal (
TERM_PROGRAM=Apple_Terminal,TERM=xterm-256color)
What happened
Claude Code rendered a Polish-language text inside a fenced code block. The user copied it from the terminal and pasted it elsewhere. The pasted text was missing exactly 26 characters in the middle of a line.
Original line as rendered by Claude Code:
zaplanować na lawetę. Oglądanie i zakup w Kiekrzu k. Poznania — na
miejscu jest pracownik upoważniony do wszystkich formalności.
Pasted result from the clipboard:
zaplanować na lawetę. Ogl. Poznania — na
miejscu jest pracownik upoważniony do wszystkich formalności.
The dropped span is:
ądanie i zakup w Kiekrzu k
Verification
A character-level diff (Python difflib.SequenceMatcher over the original file vs. the pasted clipboard content) shows the two texts (2081 vs. 2055 chars) are identical except for a single contiguous deletion of 26 characters at position 1977–2003. The first lost character is ą = U+0105 (LATIN SMALL LETTER A WITH OGONEK).
The rest of the ~2 kB text — including many other Polish diacritics (ł, ś, ż, ę, ó, č), em dashes, en dashes and typographic quotes — survived the copy intact, so this is not a general encoding problem but a localized drop.
Why this is nasty
The truncation is silent and mid-sentence, so it's easy to miss — the user only noticed after pasting the text into a real document. With non-English content this can corrupt meaning without any visual error indication.
Steps to reproduce (best effort)
- Have Claude Code output a longer (~2 kB) block of text containing non-ASCII characters (e.g. Polish) inside a fenced code block, in Apple Terminal on macOS.
- Select the output text in the terminal and copy it (the user reports it happens both with select-to-copy and manual copy).
- Paste and diff against the original — occasionally a chunk of characters beginning at a non-ASCII character is missing.
The issue is intermittent — it does not reproduce on every copy, but the user has observed it repeatedly across sessions.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗