Scrolling over mosh connection cycles through input history instead of conversation history
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
- Connect to a remote machine via mosh
- Run Claude Code
- Have a conversation with multiple exchanges
- 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.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗