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

Resolved 💬 9 comments Opened Oct 20, 2025 by nijaru Closed Feb 12, 2026

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.

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗