Anthropic engineer Thariq Shihipar said Claude Code’s terminal rendering system had to be rewritten after bugs emerged across different terminal and operating system environments, including cases where the rendering pipeline triggered garbage collection too frequently.
He announced the update in a post on X on January 22.
He said the rewrite was a legacy migration that required replacing the rendering engine while ensuring no user-facing regressions.
Shihipar estimated that without Claude Code, the work could have taken one to two years for a single engineer in a large organisation, but clarified that the estimate was approximate and shaped by coordination costs, evolving codebases, and diverse user environments.
“Most people’s mental model of Claude Code is that ‘it’s just a TUI’, but it should really be closer to ‘a small game engine’,” said Shihipar.
He said that on every frame, Claude Code constructs a UI state, calculates the layout, converts it into a screen representation, compares it with the previous frame, and generates the minimal ANSI instructions needed to update the terminal. “We have a ~16ms frame budget, so we have roughly ~5ms to go from the React scene graph to ANSI written.”
In December, Shihipar explained the technical cause of terminal flickering. Terminals contain a viewport and a scrollback buffer, and when content exceeds the viewport, rendering occurs offscreen.
“Unlike regular CLI tools that print output and exit, Claude Code is a long-running interactive UI. We redraw our viewport dozens of times per second,” he said.
To address this, Anthropic rewrote the rendering system to diff individual terminal cells and emit only minimal ANSI escape sequences instead of full redraws. Full redraws are now used only when necessary, reducing flickering by roughly 85%.
Shihipar said the team considered using an alternate screen mode, similar to tools like Emacs, which would allow full control over scrolling and rendering. “However, you no longer get native terminal experiences for things like Cmd+F search, text selection, and copy/paste,” he added.
He said testing was initially limited, making the rewrite difficult. The team adopted property-based testing, generating thousands of random UI states across widths, content lengths, and Unicode edge cases, and comparing outputs between the old and new rendering systems.
Anthropic has rolled out the updated rendering system again to Claude Code users after previously rolling it back.



