NO_FLICKER mode: Korean text copied from terminal becomes mojibake on 2nd+ copy within a session

Resolved 💬 2 comments Opened Apr 6, 2026 by Geonho-Cho Closed Apr 7, 2026

Summary

When CLAUDE_CODE_NO_FLICKER=1 is set, selecting and copying Korean (Hangul) text that is already rendered inside the terminal (e.g., Korean output from Claude Code itself, or Korean that the user typed/pasted into the prompt earlier) produces mojibake when pasted — but only from the second copy onward within a session. The very first copy after session start works correctly. Starting a new Claude Code session resets the state and the first copy works again.

The on-screen rendering is always correct; the corruption only appears after paste. The source of the copy is terminal-rendered text, not text from an external application being pasted into the terminal.

Environment

  • Claude Code: 2.1.92
  • OS: Windows 11 Home 10.0.26200
  • Terminal: Antigravity IDE integrated terminal (VS Code fork by Google)
  • Shell: bash (Git Bash)
  • Locale: LANG=ko_KR.UTF-8, LC_ALL=ko_KR.UTF-8, chcp 65001
  • CLAUDE_CODE_NO_FLICKER=1

Reproduction

  1. Open the Antigravity integrated terminal with CLAUDE_CODE_NO_FLICKER=1 set.
  2. Start a Claude Code session (claude).
  3. Make Claude output any Korean text (e.g., ask it a question in Korean).
  4. Select the Korean text inside the terminal with the mouse and copy it (Ctrl+Shift+C or right-click → Copy).
  5. Paste anywhere (another app, chat input, even back into the same terminal) — first paste renders correctly.
  6. Select and copy another block of Korean text from the terminal (same session).
  7. Paste — mojibake. Example: 보여드릴게요 becomes 蹂댁뿬?쒕┫寃뚯슂.

The corruption is deterministic: 1st copy within a session is fine, every subsequent copy within the same session is corrupted. New session → first copy fine again → second broken again.

Expected

All copies of Korean text rendered in the terminal should paste correctly regardless of how many times copy has been invoked within a session.

What has been tried (no effect)

  • LANG=ko_KR.UTF-8 / LC_ALL=ko_KR.UTF-8 in .bashrc
  • chcp.com 65001 in .bashrc
  • PowerShell profile UTF-8 settings ([Console]::OutputEncoding = [System.Text.Encoding]::UTF8, etc.)

None of these shell-layer fixes change the behavior, which suggests the bug is not in locale/codepage handling but in the NO_FLICKER renderer's interaction with the terminal's clipboard extraction path.

Workarounds

  • Unset CLAUDE_CODE_NO_FLICKER — avoids the bug entirely (confirmed).
  • Start a new Claude Code session each time you need to copy Korean — only the first copy per session is safe.
  • For preserving conversation content, /export to a file works fine (no copy-paste involved).

Hypothesis

The pattern (1st copy fine, 2nd+ broken, resets per session) strongly suggests a stateful bug in the NO_FLICKER renderer's write path to the terminal screen buffer. Something in the buffer/clipboard interaction gets "dirty" after the first successful extraction, and subsequent clipboard reads see a differently-encoded representation of the same on-screen characters.

Not yet confirmed

Whether this reproduces in stock VS Code (same NO_FLICKER=1 + Korean terminal copy). If VS Code also shows the bug → likely an upstream VS Code renderer issue or a Claude Code NO_FLICKER renderer issue. If VS Code is fine → Antigravity-specific terminal integration issue. Happy to test this and follow up in a comment if helpful.

View original on GitHub ↗

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