[BUG] Fullscreen TUI in VS Code terminal: mouse drag-select works only once, next selection requires switching terminal tabs
Status Open
Reported on v2.1.231
Maintainer reply None cached
Activity 0 comments · opened Aug 23, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
In fullscreen TUI mode running inside the VS Code integrated terminal, mouse drag-to-select works only for the first selection. After that first selection is made (and auto-copied via copy-on-select), subsequent click-and-drag attempts do nothing - no highlight appears at all.
The only reliable way to make selection work again is to switch away to another VS Code terminal tab / Claude Code session and switch back. After that focus round-trip, exactly one selection works again, then the cycle repeats.
Steps to reproduce:
- VS Code, integrated terminal, Claude Code with
"tui": "fullscreen". - Click and drag over assistant output - selection highlights and is copied on release (works).
- Release the mouse, then try to click and drag a different piece of text.
- Nothing highlights. Wheel scrolling still works.
- Switch to another terminal tab and back - selection works again, once.
Notes:
- Pressing keys to clear the (invisible) previous selection does not seem to restore drag-select.
- Shift+drag (VS Code native selection bypass) works every time, so this is specific to Claude Code's in-app selection state, not the terminal.
- Likely related to the mouse-capture family tracked in #81472, but I did not find this exact "works once, needs terminal focus round-trip" variant filed.
What Should Happen?
Every click-and-drag should start a new in-app selection, replacing any previous one, without needing to switch terminal tabs to reset state.
Environment
- Claude Code: 2.1.231
- OS: macOS (Darwin 27.0.0, arm64)
- Terminal: VS Code integrated terminal (xterm.js)
- TUI: fullscreen (
"tui": "fullscreen"in ~/.claude/settings.json) - Env:
CLAUDE_CODE_SCROLL_SPEED=3; noCLAUDE_CODE_DISABLE_MOUSE*variables set - Copy on select: enabled (default)