Skip to content

Claude Code: caret cursor and no mouse clicks on prompts (mouse reporting never reaches xterm) #182

Closed

Description

@Maxaubert

Owner, 2026-10-11 (their words): "right now in claude code the cursor is always the caret cursor, it should be the normal cursor ... i cant use my cursor to click things, like when there comes permission prompts, you usually can use the mouse to click yes or no but now that doesnt work and you have to use your keyboard". Not sure whether it is permanent or comes and goes.

What was found (read-only code investigation, main at a38e05b, 2026-10-11)

Confirmed from code

  • The caret is xterm's own default: .xterm { cursor: text }, and .xterm.enable-mouse-events { cursor: default } only once xterm itself has accepted a mouse mode (DECSET 1000/1002/1003). No CSS in core/ or src/ sets a cursor. So a caret over Claude means xterm's mouseTrackingMode is none: the mouse-on request never reached it.
  • Prism Terminal does not block it: every CSI handler it registers on those modes returns false (passes through) (TerminalPanel.tsx click-caret hooks, the A theme switch is never passed on to Claude (mode 2031 / DSR 997) #172 theme-mode hook, RIS), and the resume clear resets no modes.
  • It does not swallow clicks either: click-to-move-caret listens in capture but never calls preventDefault/stopPropagation, and stands down when a program owns the mouse.
  • Claude Code does ask for the mouse here ("tui": "fullscreen", no CLAUDE_CODE_DISABLE_MOUSE*).
  • The click direction was already known to fail on 2026-09-28: wip/mouse-report-e2e (09e0dbc, never merged) adds a mouseReport e2e and notes "without the win32-input-mode wrapping the bundled ConPTY ate the report whole". No wrapping code exists on any branch.

Likely, not yet verified

To confirm first

  1. With Claude's full-screen view open, in DevTools: document.querySelector('.xterm').classList.contains('enable-mouse-events').
  2. Log raw term:data and look for \x1b[?1000h / \x1b[?1006h. Absent: ConPTY dropped it. Present but no class: the fault is in xterm or the app.
  3. Compare with Windows Terminal (and Tabby) on the same Claude version.

Fix direction

  • Output side: get the request through (ConPTY / node-pty version, or upstream fix). The app must not switch mouse mode on by itself.
  • Input side: when a program owns the mouse, send clicks in the form ConPTY accepts (win32-input-mode wrapped), in core/ (so Prism gets it, core bump).
  • Test: finish and merge the mouseReport e2e from 09e0dbc, plus a check that .xterm has enable-mouse-events and a default cursor after the probe turns mouse mode on, and a probe on Claude's real runtime (Bun), not only Node.

Activity

  1. Maxaubert commented on Oct 11, 2026

    @Maxaubert
    OwnerAuthor

    Root cause found (2026-10-12): not the terminal, Claude Code's own fullscreen auto-disable

    Measured in Prism Terminal (new e2e mouseReport, PR to follow): a raw-mode program that turns mouse reporting on, as Claude Code's fullscreen view does, gets it. xterm takes the mode (enable-mouse-events, cursor default, not the text caret), and a click reaches the program as an SGR press and release (ESC[<0;77;23M / ESC[<0;77;23m), under Node and under Bun (Claude Code's runtime). So the ConPTY theory above was wrong: ConPTY forwards the request and the clicks.

    What turned it off: Claude Code only asks for the mouse in its fullscreen TUI, and it switches that off by itself after repeated failed starts. ~/.claude.json holds:

    "fullscreenAutoDisabled": { "version": "2.1.296", "at": 1791706453522, "strikes": 7 }
    

    That is 2026-10-11 10:14, during the #180 startup investigation, when the packaged app was launched and killed many times while its restored Claude tabs were still booting. Each kill counted as "a previous fullscreen launch on this machine died before it was healthy". With fullscreen off, Claude Code never asks for the mouse: the text caret, and no clicks on AskUserQuestion. (From Claude Code 2.1.296's own strings: "fullscreen disabled: turned off on this machine after repeated failed starts (recorded sticky auto-disable, honoured at REPL mount) · /tui fullscreen or CLAUDE_CODE_NO_FLICKER=1 to override".)

    The fix on this machine: run /tui fullscreen once in Claude Code. The record is also per Claude Code version, so the next update clears it.

    For the future: force-closing the app while restored Claude tabs are still starting counts against Claude Code's fullscreen. Installs and test launches should let a launch settle before closing it.

  2. Maxaubert commented on Oct 12, 2026

    @Maxaubert
    OwnerAuthor

    Resolved: the caret and missing mouse came from Claude Code's fullscreen mode having been auto-disabled after failed starts (see the earlier comment and docs/diagnostics.md), not from the terminal. The mouseReport e2e merged in #192 holds that a program asking for the mouse gets it, under Node and Bun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions