@trq212: We’ve rewritten Claude Code’s ...
@trq212
215 views
Jan 07, 2026
1
We’ve rewritten Claude Code’s terminal rendering system to reduce flickering by roughly 85%.
We wanted to share more about why this was so difficult, how the fix works and how we used Claude Code to fix it 🧵
We wanted to share more about why this was so difficult, how the fix works and how we used Claude Code to fix it 🧵
4
Over the past few months, we've rewritten our rendering system from scratch.
We now diff each cell and emit the minimal escape sequences needed to update what changed. We only do full redraws when we absolutely have to.
We now diff each cell and emit the minimal escape sequences needed to update what changed. We only do full redraws when we absolutely have to.
5
Why not virtualize scrolling?
When you something like emacs, the terminal switches to an "alternate screen". The program controls everything: scrolling, selection, the works. When you exit, your previous terminal content reappears. This would solve flicker entirely.
When you something like emacs, the terminal switches to an "alternate screen". The program controls everything: scrolling, selection, the works. When you exit, your previous terminal content reappears. This would solve flicker entirely.
6
However, you no longer get native terminal experiences for things like Cmd+F search, text selection, and copy/paste.
We value this native experience a lot. We may explore alternate screen mode in the future, but our bar is quite high.
We value this native experience a lot. We may explore alternate screen mode in the future, but our bar is quite high.
7
Why this took so long
We started with almost no tests to verify rendering. It was humbling: fix something, break something else.
What unblocked us was property-based testing. We wrote tests that rendered components through both the old & new systems and diffed them.
We started with almost no tests to verify rendering. It was humbling: fix something, break something else.
What unblocked us was property-based testing. We wrote tests that rendered components through both the old & new systems and diffed them.
8
The tests generated thousands of random UI states—different widths, content lengths, Unicode edge cases—and verified the new renderer matched the old one.
This created a feedback loop that let Claude Code easily verify its work and make progress on the issue.
This created a feedback loop that let Claude Code easily verify its work and make progress on the issue.
9
You can read more about this in-depth in Chris's comment on this Github issue: github.com/anthropics/cla…

