claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Prompt edit box is capturing all mouse input as text

Open richbodo opened this issue 3 months ago • 7 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Version: 2.0.9 (Claude Code) Mac Uname -a: Darwin Richards-MacBook-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020 arm64

Claude code, at some point, starts capturing all the mouse movement as text in the edit box. I didn't do anything special, and I can't pinpoint what triggers it. It just happens after about an hour - that's the best correlation I have. Stopping and restarting claude code fixes it. Claude will still be able to interpret some commands, recognizing that "the user seems to have sent some screen control codes by accident"

I'm just using the standard mac terminal.

Image

What Should Happen?

Anthropic should protect the claude prompt box from mouse input.

Error Messages/Logs


Steps to Reproduce

Install claude code 2.0.9 on mac osx. Just use it for a while. You'll start to see screen control codes flood the prompt box when you move the mouse.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.9

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

richbodo avatar Oct 08 '25 07:10 richbodo

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5224
  2. https://github.com/anthropics/claude-code/issues/4865
  3. https://github.com/anthropics/claude-code/issues/2769

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 08 '25 07:10 github-actions[bot]

Same here, but much worse with the new edit in nvim feature.

Nek-12 avatar Oct 08 '25 08:10 Nek-12

I suppose this is a dup of a lot of other issues, but it's really unclear as to why it's happening, and none of the issues that it is a dup of are still open, so this is going to be abandoned at some point. It's probably related to developing a TUI - the mouse input gets captured by the TUI, and claude code doesn't shut down tuis properly. If it could just shut the TUI apps down completely after each run, maybe this wouldn't happen. I mean, this does not affect a lot of users, but it's valid and seems to affect TUI users and nvim users, at least.

richbodo avatar Oct 08 '25 11:10 richbodo

I have the same issue, not sure what causes it but it started happening a few days ago.

jriskin avatar Oct 10 '25 20:10 jriskin

I have the same issue, not sure what causes it but it started happening a few days ago.

@jriskin are you using a TUI or neovim? Testing something that uses mouse input in a terminal?

richbodo avatar Oct 10 '25 20:10 richbodo

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 08 '25 10:12 github-actions[bot]

Don't close this issue. This is an automatic message by Fresh - a bot against stale bots.

Nek-12 avatar Dec 08 '25 10:12 Nek-12

I'm having this issue as well.

adambahe avatar Dec 14 '25 06:12 adambahe

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 13 '26 10:01 github-actions[bot]

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Upvote or comment on that issue, so maybe it gets noticed.

marcindulak avatar Jan 13 '26 11:01 marcindulak