Stray DECRPM response printed on tmux window focus after resuming conversation

Resolved 💬 2 comments Opened Mar 31, 2026 by undont Closed May 6, 2026

Description

When resuming a specific conversation with claude --resume, switching away from the tmux window containing Claude Code and switching back (via an fzf-based tmux picker) prints a stray terminal escape sequence to the visible output:

[?997;1n

This is a DECRPM (DEC Private Mode Report) response for mode 997 (modifyOtherKeys/extended keyboard protocol).

Reproduction

  1. Have a Claude Code session running inside tmux
  2. End the session
  3. Resume the conversation with claude --resume
  4. Switch to a different tmux window using an fzf-based tmux picker
  5. Switch back to the Claude Code window
  6. [?997;1n is printed in the terminal

Key observations

  • Only affects the resumed conversation — other Claude Code sessions in the same tmux server are unaffected
  • Starting a fresh claude session does not exhibit the issue
  • Persists across restarts: closing and resuming the same conversation brings the issue back
  • Other conversations resumed with --resume do not have this issue — it appears to be specific to certain conversation states

Environment

  • Claude Code CLI
  • tmux 3.6a with extended-keys always and extkeys terminal feature
  • Ghostty terminal
  • macOS 26.3.1 (Darwin 25.3.0)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗