[BUG] Pasting a colored emoji from a GitHub comment editor garbles the TUI

Status Open
Reported on v2.1.221
Maintainer reply None cached
Activity 0 comments · opened Sep 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Pasting a colored emoji in the TUI — e.g. 👍🏽 pasted from a GitHub comment editor UI — desyncs frame composition: rows after it are drawn on top of one another with per-character column drift, producing interleaved/garbled text (see screenshot). The emoji appears to be measured as a different display width than the terminal actually draws it, so every following column is offset by one and redraws overprint existing text instead of replacing it.

Ctrl+L only repaints the current frame; the corrupted rows stay in scrollback. Exiting and restoring the session does not clear it, which points at the rendered frame/scrollback rather than session state.

Same visible symptom as #68755 (closed as not planned) and the same width-miscount mechanism as the open #87856 (Thai combining marks), but the trigger here is a colored emoji, on Linux.

Distinct from #80475, which the maintainer says was fixed in 2.1.221 by updating the Unicode width tables so newly-assigned Unicode 16/17 emoji (🫪, 🫩) measure as two cells. 👍🏽 is a long-standing emoji already measured correctly, so that fix doesn't touch it; here only the editor-copied form breaks, pointing at a qualified multi-codepoint sequence rather than a single unknown-width codepoint — and it still reproduces on 2.1.263.

What Should Happen?

Pasting text that contains a colored emoji — from GitHub's comment editor or any other source — should never corrupt the TUI. Rendering the emoji in color would be a nice-to-have, but at minimum Claude Code should show the default glyph and keep the frame intact.

Most importantly: ordinary pasted input should never be able to desync frame composition and corrupt scrollback in a way that survives a session restart, however rare the trigger.

Error Messages/Logs

Steps to Reproduce

  1. Open a GitHub comment containing a colored emoji (e.g. 👍🏽) and click Edit so the raw text sits in the comment editor.
  2. Select and copy the text (including the emoji) from the editor.
  3. Paste it into the Claude Code prompt and submit.
  4. Observe adjacent rows composited over each other with shifted columns.

Important note: copying the same emoji from the rendered (non-edit) comment does NOT reproduce — Claude Code receives the plain emoji and renders fine. The two clipboard payloads differ, and only the editor copy breaks rendering.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.263

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

Environment
  • OS: Pop!_OS (kernel 7.1.1)
  • Terminal: VTE-based (GNOME Terminal / Console family), VTE 0.68
  • TERM=xterm-256color, COLORTERM=truecolor

<details>
<summary><h4>Screenshot</h4></summary>

<img width="881" height="758" alt="Image" src="https://github.com/user-attachments/assets/3ffe63a8-5e77-486e-a77d-461283ddf510" />

</details>

View original on GitHub ↗