anomalyco / anomalyco/opencode

Scrolling does not work in TUI when running under tmux from ConnectBot (Android SSH client)

Open
#45,871 2 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Describe the bug

Terminal scrolling does not work in the opencode TUI when it is run inside tmux from ConnectBot (Android SSH client). Long outputs/conversations can only be scrolled partially (or not at all), making them hard to read on mobile.

To reproduce

  1. On an Android phone, connect to a Linux host with ConnectBot (SSH).
  2. Start a tmux session: tmux new -s work
  3. Run opencode inside that session.
  4. Try to scroll up through the conversation/output with the wheel or touchpad gesture.

Expected behavior

Scroll events should scroll the tmux pane scrollback (like other terminal TUIs such as less, vim, htop do under the same setup), or opencode should let scroll work via tmux copy-mode.

Actual behavior

Scrolling does nothing — no scrollback is revealed, and the output simply cannot be paged through on the phone.

Additional context

This is very likely a limitation of the terminal emulator: ConnectBot does not report mouse-wheel/SGR-mouse events to tmux, so tmux (even with set -g mouse on) has nothing to forward to the full-screen TUI. Ideas for opencode to consider:

  • Fallback to supporting keyboard-only paging (PgUp/PgDn, etc.) so TUI users on terminals without mouse reporting can still navigate.
  • Document recommended terminal usage for mobile SSH clients, or detect terminals that lack mouse support.

Environment

  • opencode: the version from the user's current session (TUI)
  • Host terminal: ConnectBot (Android) over SSH
  • Terminal multiplexer: tmux (running on the SSH host)
  • Host OS: Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.