Claude Code 推出 NO_FLICKER 渲染模式,優化終端機顯示體驗
AI 語音朗讀 · Edge TTS
Claude Code 推出 NO_FLICKER 渲染模式,優化終端機顯示體驗。
Claude Code 發布了名為「NO_FLICKER」的實驗性渲染模式,透過虛擬化視窗技術解決終端機顯示閃爍與記憶體佔用問題。此更新將介面繪製方式改為類似 vim 的全螢幕模式,並引入了滑鼠互動功能,旨在改善長對話中的使用體驗。
核心技術與優勢
Claude Code 的「NO_FLICKER」模式並非指視窗最大化,而是讓程式接管終端機的繪圖表面(類似 vim 或 htop 的運作方式)。透過虛擬化整個視窗(viewport),該模式帶來了顯著的改善:
- 消除閃爍與跳動:解決了在 VS Code 整合終端機、tmux 或 iTerm2 等渲染瓶頸較明顯的環境中,輸出內容時畫面閃爍或捲動位置跳動的問題。
- 記憶體使用穩定:僅渲染當前可見的訊息,確保在長時間對話中記憶體佔用保持恆定。
- 增強互動性:支援滑鼠操作,包括點擊輸入框定位游標、點擊展開或收合工具輸出結果、點擊連結,以及拖曳選取文字。
使用限制與權衡
儘管該模式提升了體驗,但由於其接管了終端機的繪圖層,使用者必須適應新的操作邏輯:
- 搜尋功能變更:原生的
Cmd-f無法直接搜尋對話內容。使用者需透過Ctrl+o進入「transcript mode」才能進行搜尋或將內容輸出至終端機的捲動緩衝區。 - 複製貼上行為:選取文字後會自動複製到剪貼簿,這與傳統終端機行為不同。若需關閉此功能,需在設定中調整。
- 滑鼠衝突:在 tmux 或 SSH 環境下,滑鼠捕捉功能可能與終端機原生的選取行為產生衝突。若使用者高度依賴原生選取,可設定
CLAUDE_CODE_DISABLE_MOUSE=1來停用滑鼠捕捉,同時保留無閃爍渲染與記憶體優化功能。
設定與相容性
此功能目前為研究預覽版,需使用 Claude Code v2.1.88 或更高版本。
- 啟用方式:執行時設定環境變數 `CLAUDE_CODE_NO_FLICKER=1
Today we're excited to announce NO_FLICKER mode for Claude Code in the terminal
— Boris Cherny (@bcherny) April 1, 2026
It uses an experimental new renderer that we're excited about. The renderer is early and has tradeoffs, but already we've found that most internal users prefer it over the old renderer. It also… https://t.co/taFud8twm9 pic.twitter.com/L6d16HHBg5
Some of the upsides:
— Boris Cherny (@bcherny) April 1, 2026
- No more flickering
- No more jumping
- Constant memory and CPU usage as the conversation grows
- Mouse support! You can now click to move your cursor within the input box. Some other UI elements are also clickable now.
- Nicer selection behavior. eg. when…
There's also downsides:
— Boris Cherny (@bcherny) April 1, 2026
- Native cmd-f doesn't work. Instead, hit ctrl+o then / to search the transcript (or, use ctrl-r for reverse search)
- Native copy-paste doesn't work. Instead, we copy to the clipboard by default when you make a selection. You can configure this in your…
There's a lot of tradeoffs when building for the terminal. Unlike web, mobile, and desktop, terminal have fairly restrictive instruction sets for rendering: ANSI escape codes.
— Boris Cherny (@bcherny) April 1, 2026
There's an ANSI code for "move cursor to (x, y)", another for "write 'foo'", etc. It feels a little…
Our new experimental NO_FLICKER renderer solves this by virtualizing the entire viewport.
— Boris Cherny (@bcherny) April 1, 2026
We hook into keyboard and mouse events to make scrolling work, and we virtualize the viewport to move control over what is rendered into the application layer.
This approach has tradeoffs,…
Let us know what you think! We're actively iterating on this new mode, and can't wait to hear your feedback.https://t.co/rWPTv9Ki11
— Boris Cherny (@bcherny) April 1, 2026
