[BUG] Mouse click in Ptyxis (GNOME/VTE) interpreted as Escape, canceling in-flight commands (2.1.220)
What's Wrong?
In a Ptyxis (GNOME/VTE) terminal on Linux, any mouse click inside the Claude Code window is interpreted as an Escape keypress, which cancels whatever is currently running (a tool call, a streaming response) instead of just moving focus or the text cursor.
This looks related to the same class of bug as #81648 (SGR mouse-tracking sequences leaking into the prompt on 2.1.220, Apple Terminal) and #78788 (ESC keypresses intermittently dropped / split escape sequences leaking under tmux + Terminal.app) — but the symptom here is different: instead of garbage fragments landing as literal text in the prompt, only the leading ESC byte of the SGR mouse report appears to be consumed and treated as an actual Escape keypress, triggering cancellation. Filing separately since platform (Linux/VTE) and exact symptom (cancel vs. text leak) differ from those reports.
What Should Happen?
A plain mouse click inside the terminal window should not cancel an in-flight command. Either the SGR mouse-tracking sequence should be fully parsed and consumed (not just its leading ESC byte), or mouse reporting shouldn't be enabled in a way that causes this on VTE-based terminals.
Steps to Reproduce
- Open Claude Code in Ptyxis (GNOME Terminal built on VTE), on a Wayland session.
- Send a prompt that triggers a tool call (e.g., a Bash command) or a longer streaming response.
- While it's running, click anywhere inside the terminal window (not on a specific UI element — just a plain left click).
- The in-flight command/response is cancelled, as if Escape had been pressed.
This is consistently reproducible on every click, not intermittent.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Claude Code Version
2.1.220 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
- Distro: Fedora Linux 44 (Workstation Edition) x86_64
- Desktop: GNOME Shell 50.4
- Session type: Wayland (
XDG_SESSION_TYPE=wayland) - Terminal: Ptyxis 50.1 (
ptyxis-50.1-2.fc44.x86_64) - Terminal library: VTE 0.84.1 (
vte291-0.84.1-1.fc44.x86_64) $TERM:xterm-256color- Install method: native, stable channel, auto-update enabled (
claude doctorreports no installation issues, last update 2026-08-04 → 2.1.220)
Workarounds found:
- Avoid clicking in the window while a command is running; use only keyboard navigation.
- Holding Shift while clicking/dragging forces the terminal's native text selection (bypassing the app's mouse capture), which is useful for copy/paste but doesn't address normal interaction with the Claude Code UI.