You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI leaves stale "ghost" characters on screen in Termux, only cleared by forced full redraw #47255
On Termux (Android), during normal opencode TUI usage, leftover/duplicated text fragments remain visible on screen after content updates — they are not present in the actual output stream (confirmed by cloning and inspecting logs; PTY data is clean). The artifacts disappear only when the terminal is forced to fully redraw — e.g. rotating the screen (which triggers a resize/WindowSizeMsg). This strongly suggests the Bubbletea (v2) standard renderer's line-diffing doesn't fully erase the previous line before writing shorter new content in this terminal environment, possibly due to a character-width mismatch (icons/Nerd Font glyphs/emoji) between what Bubbletea assumes and how Termux's terminal-view renders them.
Repro:
Run opencode in Termux
Trigger UI updates where line length shrinks
Observe leftover/ghost characters
Rotate the screen → artifacts clear (full redraw via WindowSizeMsg)
Additional context:
opencode TUI is built on Go + Charmbracelet Bubbletea (v2)
Bubbletea's standard (non-alt-screen) renderer only diffs and overwrites changed lines rather than clearing the full screen
This issue might be related to an existing Termux TUI issue. Please check:
TUI flickers and disconnects on repeated resize over Termux mobile SSH #44093: TUI flickers and disconnects on repeated resize over Termux mobile SSH — also affects Termux on Android, also involves stale/garbled rendering, though the primary root cause there is a resize-listener leak rather than character-width mismatch. The two issues may share contributing factors.
It would also help maintainers to fill in the OpenCode version, Operating System, and Terminal fields in the issue template if you haven't already.
Thanks for reporting this! Before we can look into it, we need a few more details:
OpenCode version: the output of opencode --version, and how you installed it in Termux (npm @opencode/cli, opencode-ai, the wallentx/opencode-termux build, etc.).
Environment: Android and Termux versions, and the font you use in Termux (for example a Nerd Font or the default).
Steps, in your own words: briefly, which screen or action leaves the ghost characters (for example scrolling a session, streaming a response, opening a dialog), and what you expected to see versus what you saw.
A screenshot of the leftover characters, if you can take one.
A note on the analysis in the report: the current OpenCode TUI isn't built on Go or Bubbletea. It uses OpenTUI, so the Bubbletea renderer explanation probably doesn't apply. That's also why the exact version matters.
You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.
We haven't heard back about the details we asked for: your OpenCode version (opencode --version), how you installed it in Termux, your Android, Termux and font details, the steps that leave the ghost characters, and a screenshot. Without them we can't tell which version this affects or try to reproduce it, so I'm closing this issue for now.
If it still happens, please reply here with those details and we can reopen it, or open a new issue that includes them. Thanks!
Activity
github-actions commentedon Sep 4, 2026
This issue might be related to an existing Termux TUI issue. Please check:
It would also help maintainers to fill in the OpenCode version, Operating System, and Terminal fields in the issue template if you haven't already.
opencodejr commentedon Oct 28, 2026
Thanks for reporting this! Before we can look into it, we need a few more details:
opencode --version, and how you installed it in Termux (npm@opencode/cli,opencode-ai, the wallentx/opencode-termux build, etc.).A note on the analysis in the report: the current OpenCode TUI isn't built on Go or Bubbletea. It uses OpenTUI, so the Bubbletea renderer explanation probably doesn't apply. That's also why the exact version matters.
You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.
opencodejr commentedon Oct 31, 2026
We haven't heard back about the details we asked for: your OpenCode version (
opencode --version), how you installed it in Termux, your Android, Termux and font details, the steps that leave the ghost characters, and a screenshot. Without them we can't tell which version this affects or try to reproduce it, so I'm closing this issue for now.If it still happens, please reply here with those details and we can reopen it, or open a new issue that includes them. Thanks!