[BUG] Touchscreen scrolling injects repeated aN;NaNm fragments into prompt input

Open 💬 0 comments Opened Jul 9, 2026 by olympichek

Title

[BUG] Touchscreen scrolling injects repeated aN;NaNm fragments into prompt input

Body

Summary

When Claude Code is using the fullscreen TUI renderer (/tui fullscreen), scrolling with a touchscreen fills the prompt input buffer with repeated aN;NaNm fragments.

This looks related to #72175, where a malformed truecolor ANSI escape sequence leaks into the prompt buffer:

\x1b[38;2;NaN;NaN;NaNm

The difference is the trigger and renderer condition: in this case, the repeated injection happens while scrolling with a touchscreen while /tui fullscreen is enabled, apparently once per scroll/redraw event.

Actual behavior

The prompt input gets filled with repeated fragments like:

aN;NaNmaN;NaNmaN;NaNmaN;NaNm...

This text appears in the input field itself, not just as display corruption.

Expected behavior

Touchscreen scrolling should scroll the Claude Code fullscreen TUI without inserting any text into the prompt buffer.

Steps to reproduce

  1. Open Claude Code in a terminal.
  2. Enable the fullscreen TUI renderer with /tui fullscreen.
  3. Use a touchscreen gesture to scroll the Claude Code TUI.
  4. Observe the prompt/input field.

Observed result

The input field is populated with repeated aN;NaNm fragments.

Possible cause

This appears to be the leaked tail of a malformed ANSI truecolor sequence:

\x1b[38;2;NaN;NaN;NaNm

If the terminal partially consumes the escape sequence, the remaining text fragment aN;NaNm is left in the prompt buffer. Touchscreen scrolling in /tui fullscreen seems to trigger the leak repeatedly.

Related issue

Possibly related to #72175, but with a different trigger:

  • #72175 reports aN;NaNm entering the prompt after a malformed truecolor escape.
  • This report reproduces the same visible prompt-buffer corruption during touchscreen scrolling with /tui fullscreen enabled.

Environment

Please update with the exact affected environment before submitting:

Claude Code version: TODO: run `claude --version` in the affected terminal
OS / kernel: Linux Zeta 7.1.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 07 Jul 2026 05:05:48 +0000 x86_64 GNU/Linux
Terminal / IDE: TODO
Shell: /usr/bin/bash
TERM: xterm-256color
COLORTERM: truecolor
TERM_PROGRAM:
Renderer: fullscreen (`/tui fullscreen`)
Install method: TODO

Workaround

Ctrl-U clears the prompt after the fragments are inserted. Switching back to the default/classic renderer with /tui default, or using keyboard scrolling or mouse-wheel scrolling, may avoid the touchscreen-specific trigger.

View original on GitHub ↗