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

Status Closed — not planned
Maintainer reply None cached
Activity 9 comments · opened Oct 20, 2025 · 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 ↗

9 Comments

github-actions[bot] · 11 months ago

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

dantheman2865 · 11 months ago

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?

Ishannaik · 11 months ago

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

IndieDevYulin · 11 months ago

Issue observed in Blink Shell mosh on ipad

github-actions[bot] · 10 months ago

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.

genereda · 9 months ago

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.

github-actions[bot] · 8 months ago

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.

marcindulak · 8 months ago

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.

github-actions[bot] · 7 months ago

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.