[BUG] Kitty graphics APC probe overwrites tmux pane/window title until the next prompt

Status Open
Reported on v2.1.285
Maintainer reply None cached
Activity 0 comments · opened Oct 2, 2026

Summary

When Claude Code starts or resumes a session inside tmux, it sends the kitty graphics capability query (ESC _ Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA ESC \) as an APC sequence. To stay compatible with GNU screen, tmux treats APC content as a pane title. The pane title, and the terminal window title too when set-titles uses #T, turns into:

Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA

The title goes back to normal only after the next prompt is processed, when Claude Code sets the title itself again. Until then, the session name in the title is replaced by this string.

Steps to reproduce

  1. In tmux (TERM=tmux-256color), enable set -g set-titles on with a set-titles-string that contains #T.
  2. Run claude or claude --resume.
  3. Don't send a prompt. About a second later, the pane and window titles show Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA.
  4. Send any prompt. The title becomes the session name again.

Expected behavior

The image capability probe does not change the pane or window title. The session name keeps showing from the moment Claude Code starts.

Why existing options don't help

  • CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 is not a solution: the session name in the title is wanted. In addition, the probe is APC, not an OSC title update, so with this variable set the garbage would likely stay in the title permanently.
  • Disabling title setting on the tmux side (allow-set-title off) also blocks the normal session-name title.

Possible fixes

  • Skip the kitty graphics probe, or wrap it in tmux passthrough (ESC Ptmux; … ESC \), when running inside tmux (TMUX is set or TERM starts with tmux/screen).
  • Re-send the title (OSC 0/2) right after the probe finishes.
  • Provide a setting or env var that disables only the image capability probe.

Environment

  • Claude Code 2.1.285
  • Linux, tmux next-3.6 (git HEAD from 2025-05-03), TERM=tmux-256color, TMUX is set

Related, but a different case: #95448 (the same probe on iTerm2), #31107, #85776.

— Written by Claude Code as part of an assigned task.

View original on GitHub ↗