Skip to content

Garbled rendering in Claude Code no-flicker/fullscreen mode #121

Closed

Description

@datasciencemonkey

Problem

When Claude Code runs with CLAUDE_CODE_NO_FLICKER=1 (fullscreen mode), text renders garbled — fragments appear at wrong positions (e.g. "T.....al" instead of "Terminal"). Resizing the window temporarily fixes it.

Root Cause

PTY output reader sends fixed 4096-byte chunks. Claude Code's no-flicker mode uses dense cursor-positioning escape sequences. When a multi-byte escape sequence straddles a chunk boundary, it gets split — xterm.js receives two malformed fragments instead of one valid sequence.

Fix

  1. Client-side write batching with requestAnimationFrame (~16ms) — split sequences rejoin before xterm.js parses them
  2. Increase PTY read chunk size from 4096 to 65536 bytes

Fixed in #119.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions