Comment by chrislloyd

18 days ago

Hi! I work on TUI rendering for Claude Code. I know this has been a long-standing frustration — it's taken longer than any of us wanted.

The good news: we shipped our differential renderer to everyone today. We rewrote our rendering system from scratch[1] and only ~1/3 of sessions see at least a flicker. Very, very few sessions see flickers in rapid succession which was so annoying before. Those numbers will keep dropping as people update.

We've also been working upstream to add synchronized output / DEC mode 2026 support to environments where CC runs and have had patches accepted to VSCode's terminal[2] and tmux[3]. Synchronized output totally eliminates flickering. As always, I recommend using Ghostty which has 2026 support and zero flicker.

Happy to answer questions!

[1]: https://github.com/anthropics/claude-code/issues/769#issueco...

[2]: https://github.com/xtermjs/xterm.js/pull/5453

[3]: https://github.com/tmux/tmux/pull/4744

Why has public comms been so poor on this issue? There's been lots of Github issues posted in the Claude Code repo with lots of new comments each day screaming into the void, but radio silence from Anthropic since the revert in December. It's clearly causing a lot of frustration for users leading to clever workarounds like this.

It was obviously a complex issue (I appreciate that and your work!). But I think there's a lot to be improved on with communication. This issue in particular seems like it has lost a lot of user trust - not because it was hard to solve and took awhile - but because the comms and progress around it was so limited.

Eg issues:

* https://github.com/anthropics/claude-code/issues/1913

* https://github.com/anthropics/claude-code/issues/826

* https://github.com/anthropics/claude-code/issues/3648

  • The communication is definitely on me! There honestly wasn't much new to say -I've been slowly ramping since early Jan just to be extra sure there's no regressions. The main two perf. issues were:

    1. Since we no longer have <Static> components the app re-renders much more frequently with larger component trees. We were seeing unusual GC pauses because of having too much JSX... Better memoization has largely solved that. 2. The new renderer double buffers and blits similar cells between the front and back buffer to reduce memory pressure. However, we were still seeing large GC pauses from that so I ended up converting the screen buffer to packed TypedArrays.

    • I’m really surprised that GC is an issue at the bits/sec throughput a TUI would be pushing. At the risk of making an obvious observation: your render loop is doing way too much work for what it is producing.

      15 replies →

  • Presumably they had no clue how to fix it and just ignored it and pretended everything works fine because they didn't want to admit it?

On the Ghostty recommendation, read this first - https://mitchellh.com/writing/ghostty-memory-leak-fix

> A few months ago, users started reporting that Ghostty was consuming absurd amounts of memory, with one user reporting 37 GB after 10 days of uptime.

> ...

> The leak was present since at least Ghostty 1.0, but it is only recently that popular CLI applications (particularly Claude Code) started producing the correct conditions to trigger it at scale. The limited conditions that triggered the leak are what made it particularly tricky to diagnose.

> The fix is merged and is available in tip/nightly releases, and will be part of the tagged 1.3 release in March.

Have you guys seriously considered decoupling the TUI / UI so anyone can write their own on top of Claude Code proper? I love how Zed did it, but its not always the most stable experience, but it is definitely better than staring at a TUI.

Thanks for the update!

  • I believe the CC editor extensions and Zed's ACP both use the Claude Agent SDK.

    • Interesting, I'm only an end-user so I don't know too much about it, but the reason I ask is because of "OpenCode" or whatever it was called, that people were using instead of Claude Code itself, I figured if there was a way to make your own UI on top of Claude Code, surely OpenCode would have used it? Not sure whatever came of that whole fiasco. I never used OpenCode, but I like having the option to swap UIs as needed.

      3 replies →

While I have you on the line, I'm also experiencing tons of API request timeouts using Claude Code's own TUI client (on the $200/mo plan!!) and I don't know how to mitigate that, and it is frustrating

I'm not even using it particularly hard. Usually only one agent is running with possibly one sub-agent on occasion. Which is confusing because I've heard of people running ten at once and only then running into this issue...

Possibly related, I DID only upgrade to the $200 tier a few days ago... might there be a now-stale API rate limit in place?? Or maybe it's the long-running multi-compacted context that's the problem?

My account is tied to lumbergh-at-gmail-dot-com

I'm a dev so of course, happy to help run it down from my end

This tool is amazing btw. I'm currently working on a never-existed-before app that would have been impossible before AI... And it's going quite well

> and only ~1/3 of sessions see at least a flicker

Sounds like only is a bit misplaced. IMHO such bugs that take forever to fix make Anthropic seem very unprofessional.

> only ~1/3 of sessions see at least a flicker.

...after many months, for such a visible bug, is such a crazy thing to say.

In case the above comes across as too hostile, to balance this, I would say thank you to the claude code team for such an amazing product!

  • More than 30% of the times you use Claude Code it "flickers"? That can't be right? I use neovim and codex side by side with tmux, both flicker about 0%, what is Claude Code doing that makes it flicker so much? Seems strange

    • (It's worth reading the gh comment I linked if you're interested in terminals!)

      tl;dr other programs like Neovim and Codex use the "alternate screen buffer" which means they don't use scrollback and reimplement their own scrolling. CC uses scrollback (because that's what most users expect) which it has to clear entirely and redraw everything when it changes (causing tearing/flickering). There's no way to incrementally update scrollback in a terminal.

      (I also want to add some more flavor to the 1/3 metric because I don't want it to be mis-interpreted. "30% of the time you use CC it flickers" isn't quite accurate - it's dependent on screen height and what you do. Most people will not see _any_ flickers at all. Some people with short screens (typically VSCode users because by default the terminal opens fairly short) will see flickers. Previously, if something rendered offscreen users would see a flicker for _every subsequent frame_ regardless of wether anything was actually changing. Now they will only see a flicker occasionally when it's _absolutely_ needed. Once or twice vs thousands.

      Additionally, the metric really tracks when CC emits a "clear scrollback" operation. If the user is in a terminal that supports DEC 2026 they won't see a flicker even if we emit that clear scrollback command.)

      1 reply →

Seeing massive slowdowns in console interactions today... is there a correlation? Others here at my work are seeing it too!

> The good news: we shipped our differential renderer to everyone today. We rewrote our rendering system from scratch[1] and only ~1/3 of sessions see at least a flicker. Very, very few sessions see flickers in rapid succession which was so annoying before. Those numbers will keep dropping as people update.

I'm using the latest version and see terrible flicker in tmux still. You guys should be ashamed tbh.

  • How tall is your tmux pane? If it's very small it might still flicker as CC tries to redraw scrollback. I've noticed several tmux users have layouts where they stack several panes on top of each other making each one quite short.

    Another option is to rebuild tmux from latest source so it buffers synchronized output, which should prevent the flicker entirely.

    If you're still seeing a terrible flicker please file a `/bug`!

    • Thanks for your response.

      > How tall is your tmux pane? If it's very small it might still flicker as CC tries to redraw scrollback. I've noticed several tmux users have layouts where they stack several panes on top of each other making each one quite short.

      It's full screen ("maximized" as tmux calls it).

      > Another option is to rebuild tmux from latest source so it buffers synchronized output, which should prevent the flicker entirely.

      I'll give it a shot.

  • I'm sorry for the low quality comment, but man, get some perspective.

    • > low quality comment

      What else do you want me to say? It's ironic that one has to jump through hoops (like this post) to get basic functionality right in a tool that claims it'll replace software engineers.

    • Well it's for profit company and a closed code app. How cares about "hurting their feeling" or whatever? Harsh criticism seems perfectly appropriate here...

    • This seems stupid but after evaluating Claude vs Codex, this problem alone made me pick Codex.

      If I cannot follow what the thing is doing the tool becomes useless and expensive.

      I use Kitty + zellij, I love TUIs and use them all over the place, this is the only tool I know with this issue.

i’ve noticed the issue with tmux more than with specific terminals.

basically, the rapid replay of the entire conversation history (the CC bug) somehow interacts destructively with something in tmux, causing it to be 10 times worse. The “flicker” becomes a multi-second delay while I wait twiddling my thumbs…

i’ve seen this in every terminal, including ghostty… as nice as ghostty is, expecting everyone to use it is kinda meh (at least support Wezterm too, lol)