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

Scrolling over mosh connection cycles through input history instead of conversation history

Open nijaru opened this issue 6 months ago • 6 comments

Environment

  • OS: macOS (Darwin 24.6.0)
  • Terminal: Ghostty
  • mosh version: 1.4.0
  • Connection method: mosh

Current Behavior

When using Claude Code over a mosh connection, scrolling (e.g., trackpad scroll, mouse wheel) cycles through previous messages in the chat input box instead of scrolling through the conversation history.

Expected Behavior

Scrolling should navigate through the conversation history, as it does when connected via ssh.

Steps to Reproduce

  1. Connect to a remote machine via mosh
  2. Run Claude Code
  3. Have a conversation with multiple exchanges
  4. Attempt to scroll up to view earlier messages in the conversation

Result over mosh: Scrolling cycles through chat input history Result over ssh: Scrolling navigates conversation history (expected behavior)

Analysis

This appears to be a difference in how Claude Code handles terminal input events between ssh and mosh. Since mosh uses a different protocol for terminal I/O (state synchronization with local prediction) compared to ssh's direct terminal forwarding, the input handling code may be interpreting scroll events differently.

Impact

This makes it difficult to review conversation history when using mosh, which is commonly used for unreliable network connections.

nijaru avatar Oct 20 '25 22:10 nijaru

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9902
  2. https://github.com/anthropics/claude-code/issues/2301
  3. https://github.com/anthropics/claude-code/issues/9001

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 20 '25 22:10 github-actions[bot]

I'm experiencing this today with MacOS Tahoe 26.0.1, but not over SSH. Using ZSH locally with Claude Code 2.0.25 has the same scroll behavior (scrolling scrolls through input history or options rather than scrolling the terminal).

I found that when I closed the terminal and re-opened it, the scroll behavior had reverted to normal. I wonder if there's a Terminal operator (or key binding) that can change the behavior and sometimes gets stuck on?

dantheman2865 avatar Oct 22 '25 17:10 dantheman2865

This happened to me when I tried going into a background process and pressed escape

Ishannaik avatar Oct 26 '25 11:10 Ishannaik

Issue observed in Blink Shell mosh on ipad

IndieDevYulin avatar Nov 15 '25 03:11 IndieDevYulin

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 15 '25 10:12 github-actions[bot]

Reproduced today with mosh via Termius. Specifically, reproduced with /plugins command- cannot scroll to top of plugins list.

No such issue when connecting via SSH without mosh.

err2x avatar Jan 12 '26 22:01 err2x

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 Feb 12 '26 10:02 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. Please upvote that issue, so maybe it gets noticed.

marcindulak avatar Feb 12 '26 13:02 marcindulak

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Feb 20 '26 14:02 github-actions[bot]