[BUG] Prompt/statusline desync in Termux (Android) after typing a skin-tone emoji (background session via claude agents)
Written with AI assistance (Claude), from the reporter's own screenshots and measurements.
Preflight
- Searched existing issues. Related, not duplicates: #98156 (
claude attachrepaint joins lines containing a skin-tone emoji, Windows Terminal), #93293 (Android soft-keyboard show/hide corrupts TUI frames), #87856 / #82338 (combining-mark width). This one is on Termux/Android and is triggered by typing the emoji into the prompt. - Latest version (
npm view @anthropic-ai/claude-code version= 2.1.295).
What's wrong
In a Claude Code background session opened from Termux via claude agents (SSH to a Linux machine, where Claude Code runs), I typed a prompt ending in a skin-tone emoji (🙌🏻, U+1F64C U+1F3FB) and sent it. From that line down the screen is scrambled: the reply line that starts with the emoji loses characters and spaces ("They'd come out of the constraint" comes out as "cTheydcameoout ofotheseconstraint"), the statusline row garbles (PR #45 shows as PRf#45, shell as shell0), and a stray cursor block appears at the left edge. The model had repeated the emoji at the start of its reply.
What should happen
The transcript and statusline render as written.
Steps to reproduce
- In Termux (Android),
sshto a Linux machine, runclaude agents, open a background session. - Send
nice 🙌🏻. - Observe the garbled lines described above.
Measurement on the terminal side
Termux advances 4 cells for 🙌🏻 (base 2 + modifier 2), not 2. In a plain Termux shell, printf '🙌🏻|\n🙌|\nx|\n' puts the | in column 4, column 2 and column 1. So it advances per code point, not per grapheme cluster (termux/termux-app#4983 is the terminal side).
I did not read Claude Code's width code, and I could not separate two possible causes: the terminal drawing the cluster wider than Claude Code expects, or the same attach/repaint path as #98156 (the session was attached, not run directly). Both fit the symptom.
Suggestion (unverified)
Terminals advertise grapheme-cluster support via DEC private mode 2027 (query with DECRQM). When a terminal does not report it, measuring per code point instead of per cluster would match what such terminals draw.
Environment
- Claude Code: 2.1.295
- Platform: Other (the session ran on z.ai GLM; the bug is rendering, not the model)
- Terminal: Termux
googleplay.2026.06.21on a Pixel 10 Pro XL, Android 17; the session runs on a Linux machine over SSH (TERM presumablyxterm-256color, not checked) - Is this a regression? I don't know.