Custom statusline 24-bit truecolor gradient quantized to flat color bands inside claudecode.nvim pty

Status Open
Reported on v2.1.234
Maintainer reply None cached
Activity 1 comment · opened Aug 18, 2026

Bug: Custom statusline 24-bit truecolor gradient quantized to flat color bands inside claudecode.nvim pty

Claude Code version: 2.1.234

Environment:

  • OS: Linux (WSL2, 6.6.87.2-microsoft-standard-WSL2)
  • Editor integration: Neovim (LazyVim distribution) with the lazyvim.plugins.extras.ai.claudecode extra (wraps claudecode.nvim)
  • Statusline: custom command-type statusline script emitting raw 24-bit ANSI (\033[38;2;r;g;bm) escape codes for a green→yellow→red gradient progress bar (rate-limit usage bar)

Steps to reproduce:

  1. Configure a custom statusline script in settings.json (statusLine.type = "command") that prints a 24-bit truecolor gradient using raw ESC[38;2;r;g;bm SGR sequences.
  2. Run claude normally in a standalone terminal (or in Neovim's plain :terminal, without the claudecode.nvim plugin) — the statusline renders the full smooth green→yellow→red gradient correctly.
  3. Run claude through the claudecode.nvim plugin (LazyVim ai.claudecode extra), which opens Claude Code inside an embedded Neovim terminal buffer/pane.
  4. Observe the same statusline script's output in that pane.

Expected: Smooth 24-bit gradient, identical to the standalone terminal.

Actual: The gradient is quantized down to ~3 flat, uniformly-colored bands (green / yellow-orange / red) with hard edges instead of a continuous transition — as if downsampled to a small ANSI palette.

Ruled out:

  • termguicolors is enabled in the Neovim session (nvim --headless -c 'lua print(vim.o.termguicolors)'true; LazyVim sets this by default).
  • Environment variables as seen by the Claude Code process itself (checked via its own Bash tool, from inside the affected claudecode.nvim session): TERM=xterm-256color, COLORTERM=truecolor — both correct and present.

Since neither Neovim's own color mode nor the environment variables Claude Code would use for terminal-capability detection are at fault, this looks like it may be the same class of issue as:

  • #35371 — Statusline truecolor quantization regression in tmux (v2.1.77)
  • #35806 — Custom statusline colors washed out in truecolor terminals since 2.1.78

but reproducing in a different kind of wrapped/nested pty (Neovim terminal buffer via a plugin) rather than tmux, and still present as of 2.1.234 — suggesting the statusline color-capability detection may not be correctly identifying truecolor support in any nested/wrapped pty, not just tmux specifically.

Additional context: Raw ANSI truecolor escapes work fine when printed directly to the same underlying pty outside of Claude Code's own statusline rendering path, which points at Claude Code's own capability detection/rendering for the statusline specifically, rather than a terminal or Neovim limitation.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗