DEV Community

RAXXO Studios
RAXXO Studios

Posted on • Originally published at raxxo.shop

Claude Code Just Fixed Terminal Flickering (How to Enable NO_FLICKER Mode)

  • The old renderer redraws the entire screen on every update, causing visible flickering

  • NO_FLICKER mode uses a virtual viewport that only patches changed characters

  • Enable it with CLAUDE_CODE_NO_FLICKER=1 claude or add export to .zshrc

  • Bonus: mouse support, cleaner copy-paste, lower CPU on long sessions

  • Still experimental but most Anthropic internal users already prefer it

The Flickering Problem

If you use Claude Code daily, you know this one. You ask a question, the response starts streaming, and your terminal screen starts flashing. Every new token triggers a full redraw. The longer the response, the worse it gets.

Not a bug in your terminal emulator. Just how the default renderer works. Claude Code clears the screen and repaints everything from scratch on every update. Fast updates plus full redraws equals flickering. On long conversations, it gets old fast.

The flickering is worst during code generation. When Claude Code writes a function line by line, each new line triggers a full screen repaint. Multiply that by a 200-line file and your terminal looks like it is having a seizure. It is functional, sure. But working like that for 8 hours straight is not a great experience.

I have been running Claude Code as my primary dev tool for months. Building entire projects, debugging production issues, writing scripts, all inside the terminal. The flickering was the one thing that kept reminding me I was staring at a terminal and not a real app. Turns out Anthropic noticed the same thing.

What NO_FLICKER Mode Actually Does

Anthropic shipped a new experimental renderer that rethinks how Claude Code draws to the terminal. Instead of the old clear-and-repaint cycle, NO_FLICKER mode uses a virtual viewport.

In practice:

Diff-based rendering. The renderer keeps a virtual copy of what is currently on your screen. When something changes, it compares the new state to the old state and only updates the specific characters and lines that actually changed. Think of it like how React diffs the virtual DOM, but for your terminal.

No more full redraws. The old renderer cleared the entire screen on every update. The new one patches only what needs to change. That is why the flickering disappears.

Mouse event support. Yes, in a terminal. The new renderer captures mouse events, which means you can click, scroll, and interact with Claude Code's interface using your mouse or trackpad. This was not possible with the old renderer.

Cleaner text selection. With the old renderer, selecting text in your terminal would often grab UI elements, borders, and formatting characters along with the actual content. The virtual viewport approach means what you see is what you select. Copy-paste works the way you expect it to.

Stable memory and CPU usage. The old renderer got progressively heavier as conversations grew longer because it was redrawing more content with each update. The new renderer stays consistent regardless of conversation length since it only touches what changed.

Anthropic described it as "virtualizing the entire terminal viewport to control rendering themselves." That tracks. They bypassed the terminal's own rendering pipeline and built their own layer on top.

If you have ever worked with game engines or GPU rendering, the concept is familiar. You maintain an offscreen buffer, compute the diff against the previous frame, and only push the changed regions to the display. Terminals were never designed for this kind of rendering control, which is probably why nobody did it before. Anthropic basically treated the terminal like a display surface and wrote their own compositor for it.

The result is that Claude Code now controls every pixel it draws. No more relying on the terminal's default behavior of "clear everything, print everything again." The terminal becomes a dumb display and Claude Code handles the intelligence of what to update and when.

How to Enable It (30 Seconds)

NO_FLICKER mode is controlled by a single environment variable. No npm install, no config file editing, no version update required. If you have Claude Code installed, you already have the new renderer. It is just not turned on by default.

You have two options.

Option 1: Try it once.

Run this in your terminal to start a single session with the new renderer:


CLAUDE_CODE_NO_FLICKER=1 claude

Enter fullscreen mode Exit fullscreen mode

This starts a single session with the new renderer. Good way to test before committing. If anything feels off, close the session and your next claude launch goes back to the default renderer. No trace left, no settings changed.

Option 2: Make it permanent.

Add the environment variable to your shell profile so every Claude Code session uses the new renderer:


# For zsh (default on macOS)
echo 'export CLAUDE_CODE_NO_FLICKER=1' >> ~/.zshrc
source ~/.zshrc

# For bash
echo 'export CLAUDE_CODE_NO_FLICKER=1' >> ~/.bashrc
source ~/.bashrc

Enter fullscreen mode Exit fullscreen mode

That is it. No config files, no settings menus, no full terminal restart. Just source the profile and every future Claude Code session uses the new renderer. Works with any terminal emulator that supports ANSI escape codes, which is basically all of them.

To disable it later, remove the line from your shell profile or set the value to 0:


CLAUDE_CODE_NO_FLICKER=0 claude

Enter fullscreen mode Exit fullscreen mode

What to Expect (and the Tradeoffs)

The renderer is still marked as experimental. Anthropic said most internal users already prefer it over the old renderer, but there are tradeoffs worth knowing about.

What gets better immediately:

  • Streaming responses look smooth. No flashing.

  • Long conversations stay snappy. No progressive slowdown as the context grows.

  • Mouse interactions work, scrolling, clicking, selecting all just function.

  • Copy-paste grabs clean text without UI garbage mixed in.

  • It feels less like a terminal hack and more like a real app.

What to watch for:

  • Some terminal emulators might handle the new rendering differently. If you see visual glitches, try a different terminal (iTerm2, Ghostty, and Warp all work well with it).

  • The mouse capture means your terminal's built-in mouse handling might behave differently while Claude Code is running.

  • Edge cases exist. It is an early release and Anthropic is actively iterating on it.

After switching, I honestly forgot I was in a terminal. Responses just flowed in, the viewport stayed put, and the whole thing felt like a native app instead of a CLI. The kind of change where you do not notice it working. You just notice the annoyance is gone.

For a feature that shipped without much noise, it makes a real difference if you spend hours in Claude Code. The 30 seconds to enable it are worth it.

Who Benefits Most

Not everyone will notice the difference equally. If you run short, quick prompts and close Claude Code after a few minutes, the flickering probably never bothered you. The people who will feel this the most:

Heavy daily users. If Claude Code is open for hours at a time and you are running long multi-step tasks, the rendering improvement is immediately obvious. No more progressive slowdown, no more visual noise during extended sessions.

Developers on older hardware. The old renderer was CPU-hungry on long conversations. If your machine fans were spinning up during big Claude Code sessions, the new renderer should help. It does less work per frame by design.

People who pair Claude Code with split panes. If you run Claude Code alongside other terminal panes (tmux, terminal tabs side by side), the flickering was especially annoying because it would visually pull your attention to the wrong pane. Smooth rendering keeps it in the background where it should be.

Screen recorders and streamers. Recording a terminal session with the old renderer looked terrible on video. The constant flashing created compression artifacts and made the footage hard to watch. NO_FLICKER mode produces clean, smooth recordings that actually look professional when shared.

The Bottom Line

Terminal AI has always been powerful but kind of janky to look at. NO_FLICKER mode fixes that. Smooth rendering, stable viewport, mouse support that works.

One environment variable. 30 seconds to set up. If you hate it, remove one line and you are back to normal.

I doubt you will want to go back.


CLAUDE_CODE_NO_FLICKER=1 claude

Enter fullscreen mode Exit fullscreen mode

Top comments (0)