anomalyco / anomalyco/opencode
Scrolling does not work in TUI when running under tmux from ConnectBot (Android SSH client)
@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
- On an Android phone, connect to a Linux host with ConnectBot (SSH).
- Start a tmux session:
tmux new -s work - Run
opencodeinside that session. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.