Claude Code has a big problem

The video explains that Claude Code, Anthropic’s AI coding terminal, faces performance issues like flickering and lag because it uses React (via Ink) for rendering, which isn’t optimized for terminal environments. Despite criticism, the team chose React for its collaborative benefits and rapid development, accepting some inefficiency in exchange for faster iteration and easier maintenance.

The video discusses recent controversy around Claude Code, Anthropic’s AI coding terminal, focusing on its performance issues—particularly flickering and slow rendering. The drama began when a developer from Anthropic shared technical details on Twitter about how Claude Code’s rendering pipeline works and the challenges they face. The main point of contention is that Claude Code, which is essentially a terminal user interface (TUI), uses React for rendering, resulting in a significant portion of its 16-millisecond frame budget being consumed by React’s virtual DOM diffing and layout calculations. This leaves little time for actually writing ANSI sequences to the terminal, leading to performance problems like flickering and lag.

The video explains that while React is typically used for web applications, it’s also been adapted for terminal UIs through libraries like Ink. However, the terminal environment is fundamentally different from the browser: updating the terminal often means appending large amounts of text or using complex escape sequences to modify previous output, which is much less efficient than updating the browser DOM. The speaker highlights the technical difficulties of rendering in terminals, such as handling scroll buffers, selection, and resizing, all of which are much more challenging than in graphical environments. These challenges are compounded by the fact that different terminals and operating systems behave inconsistently.

Despite these issues, the video defends the Claude Code team’s decision to use React and Ink. The rationale is that React’s component model and virtual DOM make it easier for a large team to collaborate without breaking each other’s code, and for AI agents to contribute to the codebase. The speaker draws parallels to Meta’s (Facebook’s) engineering philosophy, where the company often chooses to improve or rewrite underlying infrastructure (like PHP or JavaScript runtimes) rather than switch to entirely new frameworks. This approach allows rapid iteration and easier onboarding, even if it comes at the cost of some performance.

The video also compares Claude Code to alternatives like OpenAI’s CodeX (now rewritten in Rust) and OpenCode, noting that each takes a different approach to terminal rendering. Some use the standard scroll buffer, while others use “alt mode” to take over the terminal entirely. Each method has trade-offs in terms of performance, usability, and compatibility. The speaker mentions community projects like Claude Chill, which attempt to mitigate Claude Code’s performance issues by changing how updates are sent to the terminal, but these solutions often introduce their own quirks and limitations.

Ultimately, the video concludes that building complex, responsive terminal UIs is inherently difficult, and there is no perfect solution. While Claude Code’s use of React may not be the most technically efficient choice, it enables rapid development and collaboration, which has allowed the product to evolve quickly and stay ahead of competitors. The speaker suggests that as more users demand richer experiences, the future may lie in moving away from terminal-based UIs toward dedicated desktop or web applications. For now, the performance issues are real but manageable, and the outrage on social media is somewhat overblown given the complexity of the problem.